Class: NNEClient::Trade
- Inherits:
-
Object
- Object
- NNEClient::Trade
- Defined in:
- lib/nne_client/record_types/trade.rb
Instance Attribute Summary collapse
-
#trade ⇒ Object
readonly
Returns the value of attribute trade.
-
#trade_code ⇒ Object
readonly
Returns the value of attribute trade_code.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(trade_hash) ⇒ Trade
constructor
A new instance of Trade.
- #primary? ⇒ Boolean
Constructor Details
#initialize(trade_hash) ⇒ Trade
Returns a new instance of Trade.
5 6 7 8 9 |
# File 'lib/nne_client/record_types/trade.rb', line 5 def initialize(trade_hash) @primary = trade_hash[:primary] @trade_code = trade_hash[:trade_code] @trade = trade_hash[:trade] end |
Instance Attribute Details
#trade ⇒ Object (readonly)
Returns the value of attribute trade.
3 4 5 |
# File 'lib/nne_client/record_types/trade.rb', line 3 def trade @trade end |
#trade_code ⇒ Object (readonly)
Returns the value of attribute trade_code.
3 4 5 |
# File 'lib/nne_client/record_types/trade.rb', line 3 def trade_code @trade_code end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 18 19 |
# File 'lib/nne_client/record_types/trade.rb', line 15 def ==(other) primary? == other.primary? && trade_code == other.trade_code && trade == other.trade end |
#primary? ⇒ Boolean
11 12 13 |
# File 'lib/nne_client/record_types/trade.rb', line 11 def primary? @primary end |