Class: Decoder::State

Inherits:
Object
  • Object
show all
Includes:
CommonMethods
Defined in:
lib/decoder/state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CommonMethods

#inspect, #to_s

Constructor Details

#initialize(args) ⇒ State

Returns a new instance of State.



8
9
10
11
12
# File 'lib/decoder/state.rb', line 8

def initialize(args)
  self.code = args[:code].to_s
  self.name = args[:name]
  self.fips = args[:fips].to_i if args[:fips]
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



6
7
8
# File 'lib/decoder/state.rb', line 6

def code
  @code
end

#fipsObject

Returns the value of attribute fips.



6
7
8
# File 'lib/decoder/state.rb', line 6

def fips
  @fips
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/decoder/state.rb', line 6

def name
  @name
end