Class: ActiveForm::Element::CollectionOption

Inherits:
Object
  • Object
show all
Defined in:
lib/active_form/mixins/collection_element_methods.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label, value) ⇒ CollectionOption

Returns a new instance of CollectionOption.



182
183
184
# File 'lib/active_form/mixins/collection_element_methods.rb', line 182

def initialize(label, value)
  @label, @value = label.to_s, value
end

Instance Attribute Details

#labelObject

Returns the value of attribute label.



180
181
182
# File 'lib/active_form/mixins/collection_element_methods.rb', line 180

def label
  @label
end

#valueObject

Returns the value of attribute value.



180
181
182
# File 'lib/active_form/mixins/collection_element_methods.rb', line 180

def value
  @value
end