Class: AddressTypePresenter

Inherits:
Object
  • Object
show all
Defined in:
lib/glimmer-dsl-web/samples/hello/hello_component_attribute_data_binding.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_typesObject

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_typeObject

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