Class: HelloCombo::Person

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePerson

Returns a new instance of Person.



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

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

Instance Attribute Details

#countryObject

Returns the value of attribute country.



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

def country
  @country
end

#country_optionsObject

Returns the value of attribute country_options.



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

def country_options
  @country_options
end

Instance Method Details

#reset_country!Object



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

def reset_country!
  self.country = 'Canada'
end