Class: Sirens::RadioButtonGroupBuilder
- Inherits:
-
Object
- Object
- Sirens::RadioButtonGroupBuilder
- Defined in:
- lib/components_builder/radio_button_group_builder.rb
Instance Method Summary collapse
-
#initialize ⇒ RadioButtonGroupBuilder
constructor
Initializing.
-
#radio_button(props = ) ⇒ Object
List columns.
-
#render(&block) ⇒ Object
Evaluating.
Constructor Details
#initialize ⇒ RadioButtonGroupBuilder
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 (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 |