Class: Sirens::RadioButtonGroupBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/components_builder/radio_button_group_builder.rb

Instance Method Summary collapse

Constructor Details

#initializeRadioButtonGroupBuilder

Initializing



6
7
8
# File 'lib/components_builder/radio_button_group_builder.rb', line 6

def initialize()
    @buttons = []
end

Instance Method Details

#radio_button(props = ) ⇒ Object

List columns



22
23
24
25
26
# File 'lib/components_builder/radio_button_group_builder.rb', line 22

def radio_button(props = Hash[])
    props[:previous_button] = @buttons.last

    @buttons << RadioButton.new(props)
end

#render(&block) ⇒ Object

Evaluating



12
13
14
15
16
17
18
# File 'lib/components_builder/radio_button_group_builder.rb', line 12

def render(&block)
    @buttons = []

    instance_exec(self, &block)

    @buttons
end