Class: Person

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

Overview

Copyright © 2020 Andy Maleh

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePerson

Returns a new instance of Person.



25
26
27
28
# File 'lib/glimmer-dsl-opal/samples/hello/hello_combo.rb', line 25

def initialize
  self.country_options = ['', 'Canada', 'US', 'Mexico']
  reset_country
end

Instance Attribute Details

#countryObject

Returns the value of attribute country.



23
24
25
# File 'lib/glimmer-dsl-opal/samples/hello/hello_combo.rb', line 23

def country
  @country
end

#country_optionsObject

Returns the value of attribute country_options.



23
24
25
# File 'lib/glimmer-dsl-opal/samples/hello/hello_combo.rb', line 23

def country_options
  @country_options
end

Instance Method Details

#reset_countryObject



30
31
32
# File 'lib/glimmer-dsl-opal/samples/hello/hello_combo.rb', line 30

def reset_country
  self.country = 'Canada'
end