evt-mimic 1.3.0.0 → 1.3.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed676013328345e5ec1abbf9aa51fb49b5483da6e5848ac13e15ea00e3e8d3e7
4
- data.tar.gz: 700985f77818277c419ffa339d37eb4b1657d655f02533a4347668221c5e15ba
3
+ metadata.gz: 8fbb802e181bc814bd466e7f17b3a35dc3aee7997e65e4f9bc0bbc5ffe769a21
4
+ data.tar.gz: 1ce216ee2cfa4ee8fdf70697f9ca6dda7c0a99ffa5f9e064a672c0fd04882ab8
5
5
  SHA512:
6
- metadata.gz: 3965cef41102e2ec65fdeeb9dc0ec7c98a6c482161e53b8aa32e7f853d68ccf5a1c62138e2795b6e9b07ed4c7831ae127b4560b047a535ea37adba03c89dade4
7
- data.tar.gz: ab3008f2c5e01377598bdc0fddf9155aec5c596c0d6da5ec4ac9237604544e53f77c090014fd8c26f1a85878939f152a1e662979aea125fbf0a2de5f84e13755
6
+ metadata.gz: 5b9a5cbbb0b6379eeda898418af5882d5551beae18dd9f875a2886afb4daa1b31fdba83d13f699fc0657f8f728b1802af777f176de8c3f62ca00d171b75e420b
7
+ data.tar.gz: 2bbe33b95eb24ccb92fee4aac521a992314931b9841b706f15835ca0795309ded7841743667b3d3e17c087c3e0f4e1a11caf78730b9768e3795eb81894e1c327
@@ -1,7 +1,9 @@
1
1
  require 'mimic/controls/subject'
2
2
  require 'mimic/controls/subject/no_parameters'
3
3
  require 'mimic/controls/subject/positional_parameters'
4
- require 'mimic/controls/subject/named_parameters'
4
+ require 'mimic/controls/subject/optional_positional_parameters'
5
+ require 'mimic/controls/subject/keyword_parameters'
6
+ require 'mimic/controls/subject/optional_keyword_parameters'
5
7
  require 'mimic/controls/subject/block_parameter'
6
8
  require 'mimic/controls/subject/multiple_assignment_parameter'
7
9
  require 'mimic/controls/subject/multiple_assignment_named_parameter'
@@ -1,7 +1,7 @@
1
1
  module Mimic
2
2
  module Controls
3
3
  module Subject
4
- module NamedParameters
4
+ module KeywordParameters
5
5
  class Example
6
6
  def some_method(some_parameter:, some_other_parameter:)
7
7
  end
@@ -3,7 +3,7 @@ module Mimic
3
3
  module Subject
4
4
  module MixedParameters
5
5
  class Example
6
- def some_method(some_parameter, *parameters, some_other_parameter:, **named_parameters, &blk)
6
+ def some_method(some_parameter, some_optional_parameter=nil, *parameters, some_keyword_parameter:, some_optional_keyword_parameter: nil, **named_parameters, &blk)
7
7
  end
8
8
  end
9
9
  end
@@ -0,0 +1,12 @@
1
+ module Mimic
2
+ module Controls
3
+ module Subject
4
+ module OptionalKeywordParameters
5
+ class Example
6
+ def some_method(some_parameter: nil, some_other_parameter: nil)
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ module Mimic
2
+ module Controls
3
+ module Subject
4
+ module OptionalPositionalParameters
5
+ class Example
6
+ def some_method(some_parameter=nil, some_other_parameter=nil)
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -46,8 +46,12 @@ module Mimic
46
46
  name = parameter.fetch(1) { :args }
47
47
 
48
48
  case type
49
+ when :opt
50
+ return "#{name}=nil"
49
51
  when :req
50
52
  return "#{name}"
53
+ when :key
54
+ return "#{name}: nil"
51
55
  when :keyreq
52
56
  return "#{name}:"
53
57
  when :rest
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-mimic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0.0
4
+ version: 1.3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-18 00:00:00.000000000 Z
11
+ date: 2019-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-invocation
@@ -53,11 +53,13 @@ files:
53
53
  - lib/mimic/controls/recorder.rb
54
54
  - lib/mimic/controls/subject.rb
55
55
  - lib/mimic/controls/subject/block_parameter.rb
56
+ - lib/mimic/controls/subject/keyword_parameters.rb
56
57
  - lib/mimic/controls/subject/mixed_parameters.rb
57
58
  - lib/mimic/controls/subject/multiple_assignment_named_parameter.rb
58
59
  - lib/mimic/controls/subject/multiple_assignment_parameter.rb
59
- - lib/mimic/controls/subject/named_parameters.rb
60
60
  - lib/mimic/controls/subject/no_parameters.rb
61
+ - lib/mimic/controls/subject/optional_keyword_parameters.rb
62
+ - lib/mimic/controls/subject/optional_positional_parameters.rb
61
63
  - lib/mimic/controls/subject/positional_parameters.rb
62
64
  - lib/mimic/define_methods.rb
63
65
  - lib/mimic/mimic.rb