Class: HelloListMultiSelection::Person

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePerson

Returns a new instance of Person.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/glimmer-dsl-opal/samples/hello/hello_list_multi_selection.rb', line 26

def initialize
  self.provinces_options = [
    '',
    'Alberta',
    'British Columbia',
    'Manitoba',
    'New Brunswick',
    'Newfoundland and Labrador',
    'Northwest Territories',
    'Nova Scotia',
    'Nunavut',
    'Ontario',
    'Prince Edward Island',
    'Quebec',
    'Saskatchewan',
    'Yukon'
  ]
  reset_provinces
end

Instance Attribute Details

#provincesObject

Returns the value of attribute provinces.



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

def provinces
  @provinces
end

#provinces_optionsObject

Returns the value of attribute provinces_options.



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

def provinces_options
  @provinces_options
end

Instance Method Details

#reset_provincesObject



46
47
48
# File 'lib/glimmer-dsl-opal/samples/hello/hello_list_multi_selection.rb', line 46

def reset_provinces
  self.provinces = ['Quebec', 'Manitoba', 'Alberta']
end