Class: PositionalGenerator::Builder::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/helpers/positional_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(as_type, block) ⇒ Group

Returns a new instance of Group.



356
357
358
359
# File 'lib/helpers/positional_generator.rb', line 356

def initialize(as_type, block)
  @as_type = as_type
  @block = block
end

Instance Method Details

#generate(_) ⇒ Object



361
362
363
364
365
# File 'lib/helpers/positional_generator.rb', line 361

def generate(_)
  builder = Builder.new(@as_type)
  @block.call(builder)
  builder.build
end