Class: AdviserResult
- Inherits:
-
Object
- Object
- AdviserResult
- Defined in:
- lib/mas/adviser_result.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#range ⇒ Object
readonly
Returns the value of attribute range.
Instance Method Summary collapse
-
#initialize(data) ⇒ AdviserResult
constructor
A new instance of AdviserResult.
Constructor Details
#initialize(data) ⇒ AdviserResult
Returns a new instance of AdviserResult.
4 5 6 7 8 9 |
# File 'lib/mas/adviser_result.rb', line 4 def initialize(data) @id = data['_id'] @name = data['name'] @range = data['range'] @location = Location.new data['location']['lat'], data['location']['lon'] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
2 3 4 |
# File 'lib/mas/adviser_result.rb', line 2 def id @id end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
2 3 4 |
# File 'lib/mas/adviser_result.rb', line 2 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/mas/adviser_result.rb', line 2 def name @name end |
#range ⇒ Object (readonly)
Returns the value of attribute range.
2 3 4 |
# File 'lib/mas/adviser_result.rb', line 2 def range @range end |