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.



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

def initialize
  reset
end

Instance Attribute Details

#age_groupObject

Returns the value of attribute age_group.



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

def age_group
  @age_group
end

#genderObject

Returns the value of attribute gender.



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

def gender
  @gender
end

Instance Method Details

#age_group_optionsObject



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

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

#gender_optionsObject



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

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

#resetObject



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

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