Class: IGMarkets::MarketHierarchyResult::HierarchyNode
- Inherits:
-
IGMarkets::Model
- Object
- IGMarkets::Model
- IGMarkets::MarketHierarchyResult::HierarchyNode
- Defined in:
- lib/ig_markets/market_hierarchy_result.rb
Overview
Contains details on a single node in the market hierarchy. Used by #nodes.
Instance Attribute Summary
Attributes inherited from IGMarkets::Model
Instance Method Summary collapse
-
#id ⇒ Object
The id attribute.
-
#markets ⇒ Array<MarketOverview>
Returns an array of the markets under this node in the market hierarchy.
-
#name ⇒ Object
The name attribute.
-
#nodes ⇒ Array<HierarchyNode>
Returns an array of the child nodes under this node in the market hierarchy.
Methods inherited from IGMarkets::Model
#==, allowed_values, attribute, attribute_type, attribute_value_allowed?, defined_attribute_names, deprecated_attribute, #initialize, #initialize_copy, #inspect, #to_h, valid_attribute?
Constructor Details
This class inherits a constructor from IGMarkets::Model
Instance Method Details
#id ⇒ Object
The id attribute.
6 |
# File 'lib/ig_markets/market_hierarchy_result.rb', line 6 attribute :id |
#markets ⇒ Array<MarketOverview>
Returns an array of the markets under this node in the market hierarchy.
12 13 14 |
# File 'lib/ig_markets/market_hierarchy_result.rb', line 12 def markets @dealing_platform.markets.hierarchy(id).markets end |
#name ⇒ Object
The name attribute.
7 |
# File 'lib/ig_markets/market_hierarchy_result.rb', line 7 attribute :name |
#nodes ⇒ Array<HierarchyNode>
Returns an array of the child nodes under this node in the market hierarchy.
19 20 21 |
# File 'lib/ig_markets/market_hierarchy_result.rb', line 19 def nodes @nodes ||= @dealing_platform.markets.hierarchy(id).nodes end |