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.



354
355
356
357
# File 'lib/helpers/positional_generator.rb', line 354

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

Instance Method Details

#generate(_) ⇒ Object



359
360
361
362
363
# File 'lib/helpers/positional_generator.rb', line 359

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