Class: Em::Nordnet::Instrument
- Inherits:
-
Object
- Object
- Em::Nordnet::Instrument
- Defined in:
- lib/em-nordnet/instrument.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_in_code ⇒ Object
Returns the value of attribute is_in_code.
-
#longname ⇒ Object
Returns the value of attribute longname.
-
#market_id ⇒ Object
Returns the value of attribute market_id.
-
#shortname ⇒ Object
Returns the value of attribute shortname.
-
#ticksize_id ⇒ Object
Returns the value of attribute ticksize_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Instrument
constructor
A new instance of Instrument.
- #subscribe_params(type) ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Instrument
Returns a new instance of Instrument.
12 13 14 15 16 17 18 19 20 |
# File 'lib/em-nordnet/instrument.rb', line 12 def initialize attributes={} self.id = attributes[:id] || attributes[:identifier] self.market_id = attributes[:market_id] || attributes[:marketID] self.currency = attributes[:currency] self.shortname = attributes[:shortname] self.longname = attributes[:longname] self.is_in_code = attributes[:is_in_code] || attributes[:isinCode] self.ticksize_id = attributes[:ticksize_id] || attributes[:ticksizeID] end |
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
4 5 6 |
# File 'lib/em-nordnet/instrument.rb', line 4 def currency @currency end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/em-nordnet/instrument.rb', line 4 def id @id end |
#is_in_code ⇒ Object
Returns the value of attribute is_in_code.
4 5 6 |
# File 'lib/em-nordnet/instrument.rb', line 4 def is_in_code @is_in_code end |
#longname ⇒ Object
Returns the value of attribute longname.
4 5 6 |
# File 'lib/em-nordnet/instrument.rb', line 4 def longname @longname end |
#market_id ⇒ Object
Returns the value of attribute market_id.
4 5 6 |
# File 'lib/em-nordnet/instrument.rb', line 4 def market_id @market_id end |
#shortname ⇒ Object
Returns the value of attribute shortname.
4 5 6 |
# File 'lib/em-nordnet/instrument.rb', line 4 def shortname @shortname end |
#ticksize_id ⇒ Object
Returns the value of attribute ticksize_id.
4 5 6 |
# File 'lib/em-nordnet/instrument.rb', line 4 def ticksize_id @ticksize_id end |
Class Method Details
Instance Method Details
#subscribe_params(type) ⇒ Object
22 23 24 |
# File 'lib/em-nordnet/instrument.rb', line 22 def subscribe_params type { 't' => type.to_s, 'i' => id, 'm' => market_id } end |