Class: PokelocParser::NumberResult
- Inherits:
-
Object
- Object
- PokelocParser::NumberResult
- Defined in:
- lib/pokeloc_parser/parser.rb
Instance Attribute Summary collapse
-
#approaching ⇒ Object
Returns the value of attribute approaching.
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#number ⇒ Object
Returns the value of attribute number.
-
#statuses ⇒ Object
Returns the value of attribute statuses.
Instance Method Summary collapse
-
#initialize(approaching:, number:, destination:, statuses:) ⇒ NumberResult
constructor
A new instance of NumberResult.
- #to_h ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(approaching:, number:, destination:, statuses:) ⇒ NumberResult
Returns a new instance of NumberResult.
63 64 65 66 67 68 |
# File 'lib/pokeloc_parser/parser.rb', line 63 def initialize(approaching:, number:, destination:, statuses:) @approaching = approaching @number = number @destination = destination @statuses = statuses end |
Instance Attribute Details
#approaching ⇒ Object
Returns the value of attribute approaching.
62 63 64 |
# File 'lib/pokeloc_parser/parser.rb', line 62 def approaching @approaching end |
#destination ⇒ Object
Returns the value of attribute destination.
62 63 64 |
# File 'lib/pokeloc_parser/parser.rb', line 62 def destination @destination end |
#number ⇒ Object
Returns the value of attribute number.
62 63 64 |
# File 'lib/pokeloc_parser/parser.rb', line 62 def number @number end |
#statuses ⇒ Object
Returns the value of attribute statuses.
62 63 64 |
# File 'lib/pokeloc_parser/parser.rb', line 62 def statuses @statuses end |
Instance Method Details
#to_h ⇒ Object
70 71 72 73 74 75 76 77 |
# File 'lib/pokeloc_parser/parser.rb', line 70 def to_h { approaching: approaching, number: number, destination: destination, statuses: statuses, } end |
#to_json ⇒ Object
78 79 80 |
# File 'lib/pokeloc_parser/parser.rb', line 78 def to_json to_h.to_json end |