Class: DeepConnect::MethodSpec::ArgSpecs
- Includes:
- Enumerable
- Defined in:
- lib/deep-connect/class-spec-space.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(arg_specs) ⇒ ArgSpecs
constructor
A new instance of ArgSpecs.
- #succ ⇒ Object
Constructor Details
#initialize(arg_specs) ⇒ ArgSpecs
Returns a new instance of ArgSpecs.
244 245 246 |
# File 'lib/deep-connect/class-spec-space.rb', line 244 def initialize(arg_specs) @arg_specs = arg_specs.dup end |
Instance Method Details
#each ⇒ Object
248 249 250 251 252 253 254 255 |
# File 'lib/deep-connect/class-spec-space.rb', line 248 def each while arg_spec = @arg_specs.shift if arg_spec.mult? @arg_specs.unshift arg_spec end yield arg_spec end end |
#succ ⇒ Object
257 258 259 260 261 262 |
# File 'lib/deep-connect/class-spec-space.rb', line 257 def succ if (ret = @arg_specs.shift) && ret.mult? @arg_specs.unshift ret end ret end |