Class: Address
- Inherits:
-
Struct
- Object
- Struct
- Address
- Defined in:
- lib/glimmer-dsl-web/samples/hello/hello_component.rb,
lib/glimmer-dsl-web/samples/hello/hello_data_binding.rb,
lib/glimmer-dsl-web/samples/hello/hello_content_data_binding.rb
Constant Summary collapse
- STATES =
{ "AK"=>"Alaska", "AL"=>"Alabama", "AR"=>"Arkansas", "AS"=>"American Samoa", "AZ"=>"Arizona", "CA"=>"California", "CO"=>"Colorado", "CT"=>"Connecticut", "DC"=>"District of Columbia", "DE"=>"Delaware", "FL"=>"Florida", "GA"=>"Georgia", "GU"=>"Guam", "HI"=>"Hawaii", "IA"=>"Iowa", "ID"=>"Idaho", "IL"=>"Illinois", "IN"=>"Indiana", "KS"=>"Kansas", "KY"=>"Kentucky", "LA"=>"Louisiana", "MA"=>"Massachusetts", "MD"=>"Maryland", "ME"=>"Maine", "MI"=>"Michigan", "MN"=>"Minnesota", "MO"=>"Missouri", "MS"=>"Mississippi", "MT"=>"Montana", "NC"=>"North Carolina", "ND"=>"North Dakota", "NE"=>"Nebraska", "NH"=>"New Hampshire", "NJ"=>"New Jersey", "NM"=>"New Mexico", "NV"=>"Nevada", "NY"=>"New York", "OH"=>"Ohio", "OK"=>"Oklahoma", "OR"=>"Oregon", "PA"=>"Pennsylvania", "PR"=>"Puerto Rico", "RI"=>"Rhode Island", "SC"=>"South Carolina", "SD"=>"South Dakota", "TN"=>"Tennessee", "TX"=>"Texas", "UT"=>"Utah", "VA"=>"Virginia", "VI"=>"Virgin Islands", "VT"=>"Vermont", "WA"=>"Washington", "WI"=>"Wisconsin", "WV"=>"West Virginia", "WY"=>"Wyoming" }
Instance Attribute Summary collapse
-
#billing_and_shipping ⇒ Object
Returns the value of attribute billing_and_shipping.
-
#city ⇒ Object
Returns the value of attribute city.
-
#full_name ⇒ Object
Returns the value of attribute full_name.
-
#name ⇒ Object
Returns the value of attribute name.
-
#state ⇒ Object
Returns the value of attribute state.
-
#street ⇒ Object
Returns the value of attribute street.
-
#street2 ⇒ Object
Returns the value of attribute street2.
-
#text ⇒ Object
Returns the value of attribute text.
-
#zip ⇒ Object
Returns the value of attribute zip.
-
#zip_code ⇒ Object
Returns the value of attribute zip_code.
Instance Method Summary collapse
Instance Attribute Details
#billing_and_shipping ⇒ Object
Returns the value of attribute billing_and_shipping
24 25 26 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_data_binding.rb', line 24 def billing_and_shipping @billing_and_shipping end |
#city ⇒ Object
Returns the value of attribute city
24 25 26 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component.rb', line 24 def city @city end |
#full_name ⇒ Object
Returns the value of attribute full_name
24 25 26 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component.rb', line 24 def full_name @full_name end |
#name ⇒ Object
Returns the value of attribute name.
26 27 28 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_content_data_binding.rb', line 26 def name @name end |
#state ⇒ Object
Returns the value of attribute state
24 25 26 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component.rb', line 24 def state @state end |
#street ⇒ Object
Returns the value of attribute street
24 25 26 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component.rb', line 24 def street @street end |
#street2 ⇒ Object
Returns the value of attribute street2
24 25 26 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component.rb', line 24 def street2 @street2 end |
#text ⇒ Object
Returns the value of attribute text.
25 26 27 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_content_data_binding.rb', line 25 def text @text end |
#zip ⇒ Object
Returns the value of attribute zip.
26 27 28 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_content_data_binding.rb', line 26 def zip @zip end |
#zip_code ⇒ Object
Returns the value of attribute zip_code
24 25 26 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component.rb', line 24 def zip_code @zip_code end |
Instance Method Details
#state_code ⇒ Object
83 84 85 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component.rb', line 83 def state_code STATES.invert[state] end |
#state_code=(value) ⇒ Object
87 88 89 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component.rb', line 87 def state_code=(value) self.state = STATES[value] end |
#summary ⇒ Object
91 92 93 |
# File 'lib/glimmer-dsl-web/samples/hello/hello_component.rb', line 91 def summary to_h.values.map(&:to_s).reject(&:empty?).join(', ') end |