Class: DeepConnect::MethodSpec::ArgSpecs

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/deep-connect/class-spec-space.rb

Instance Method Summary collapse

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

#eachObject



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

#succObject



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