Class: AddressTypePresenter
- Inherits:
-
Object
- Object
- AddressTypePresenter
- Defined in:
- lib/glimmer-dsl-web/samples/hello/hello_component_attribute_data_binding.rb
Instance Attribute Summary collapse
-
#address_types ⇒ Object
Returns the value of attribute address_types.
-
#selected_address_type ⇒ Object
Returns the value of attribute selected_address_type.
Instance Method Summary collapse
-
#initialize(address_types:, selected_address_type: nil) ⇒ AddressTypePresenter
constructor
A new instance of AddressTypePresenter.
Constructor Details
#initialize(address_types:, selected_address_type: nil) ⇒ AddressTypePresenter
28 29 30 31 32 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component_attribute_data_binding.rb', line 28 def initialize(address_types:, selected_address_type: nil) @address_types = address_types @selected_address_type = selected_address_type @selected_address_type ||= address_types.first end |
Instance Attribute Details
#address_types ⇒ Object
Returns the value of attribute address_types.
26 27 28 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component_attribute_data_binding.rb', line 26 def address_types @address_types end |
#selected_address_type ⇒ Object
Returns the value of attribute selected_address_type.
26 27 28 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component_attribute_data_binding.rb', line 26 def selected_address_type @selected_address_type end |