Class: Madison

Inherits:
Object
  • Object
show all
Defined in:
lib/madison.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#statesObject

Returns the value of attribute states.



4
5
6
# File 'lib/madison.rb', line 4

def states
  @states
end

Instance Method Details

#get_abbrev(name) ⇒ Object



11
12
13
14
# File 'lib/madison.rb', line 11

def get_abbrev(name)
  raise ArgumentError("Argument must be a string") unless name.is_a? String
  state_abbrevs[name.downcase]
end

#get_name(abbrev) ⇒ Object



16
17
18
19
# File 'lib/madison.rb', line 16

def get_name(abbrev)
  raise ArgumentError("Argument must be a string") unless abbrev.is_a? String
  state_names[abbrev.downcase]
end