Class: GusBir1::Response::Simple
- Inherits:
-
Object
- Object
- GusBir1::Response::Simple
- Defined in:
- lib/gus_bir1/response/simple.rb
Instance Method Summary collapse
- #humanize ⇒ Object
-
#initialize(value, key) ⇒ Simple
constructor
A new instance of Simple.
- #to_i ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(value, key) ⇒ Simple
Returns a new instance of Simple.
6 7 8 9 |
# File 'lib/gus_bir1/response/simple.rb', line 6 def initialize(value, key) @value = value @key = key end |
Instance Method Details
#humanize ⇒ Object
19 20 21 |
# File 'lib/gus_bir1/response/simple.rb', line 19 def humanize Dictionary.send(@key)[@value.to_sym] end |
#to_i ⇒ Object
15 16 17 |
# File 'lib/gus_bir1/response/simple.rb', line 15 def to_i @value.to_i end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/gus_bir1/response/simple.rb', line 11 def to_s @value.to_s end |