Class: FirmResult
- Inherits:
-
Object
- Object
- FirmResult
- Defined in:
- lib/mas/firm_result.rb
Instance Attribute Summary collapse
-
#closest_adviser ⇒ Object
readonly
Returns the value of attribute closest_adviser.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#total_advisers ⇒ Object
readonly
Returns the value of attribute total_advisers.
Instance Method Summary collapse
-
#initialize(data) ⇒ FirmResult
constructor
A new instance of FirmResult.
Constructor Details
#initialize(data) ⇒ FirmResult
Returns a new instance of FirmResult.
7 8 9 10 11 12 13 |
# File 'lib/mas/firm_result.rb', line 7 def initialize(data) source = data['_source'] @id = source['_id'] @name = source['registered_name'] @total_advisers = source['advisers'].count @closest_adviser = data['sort'].first end |
Instance Attribute Details
#closest_adviser ⇒ Object (readonly)
Returns the value of attribute closest_adviser.
2 3 4 |
# File 'lib/mas/firm_result.rb', line 2 def closest_adviser @closest_adviser end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
2 3 4 |
# File 'lib/mas/firm_result.rb', line 2 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/mas/firm_result.rb', line 2 def name @name end |
#total_advisers ⇒ Object (readonly)
Returns the value of attribute total_advisers.
2 3 4 |
# File 'lib/mas/firm_result.rb', line 2 def total_advisers @total_advisers end |