Class: GOVUKDesignSystemFormBuilder::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/govuk_design_system_formbuilder/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(builder, object_name, attribute_name, &block) ⇒ Base


6
7
8
9
10
11
# File 'lib/govuk_design_system_formbuilder/base.rb', line 6

def initialize(builder, object_name, attribute_name, &block)
  @builder        = builder
  @object_name    = object_name
  @attribute_name = attribute_name
  @block_content  = capture { block.call } if block_given?
end