Class: HelloRadioGroup::Person

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePerson

Returns a new instance of Person.



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

def initialize
  reset!
end

Instance Attribute Details

#age_groupObject

Returns the value of attribute age_group.



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

def age_group
  @age_group
end

#genderObject

Returns the value of attribute gender.



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

def gender
  @gender
end

Instance Method Details

#age_group_optionsObject



37
38
39
# File 'lib/glimmer-dsl-opal/samples/hello/hello_radio_group.rb', line 37

def age_group_options
  ['Child', 'Teen', 'Adult', 'Senior']
end

#gender_optionsObject



33
34
35
# File 'lib/glimmer-dsl-opal/samples/hello/hello_radio_group.rb', line 33

def gender_options
  ['Male', 'Female']
end

#reset!Object



41
42
43
44
# File 'lib/glimmer-dsl-opal/samples/hello/hello_radio_group.rb', line 41

def reset!
  self.gender = nil
  self.age_group = 'Adult'
end