Class: Tradier::OptionQuote
Instance Attribute Summary collapse
-
#ask ⇒ Object
readonly
Returns the value of attribute ask.
-
#ask_size ⇒ Object
readonly
Returns the value of attribute ask_size.
-
#bid ⇒ Object
readonly
Returns the value of attribute bid.
-
#bid_size ⇒ Object
readonly
Returns the value of attribute bid_size.
-
#change ⇒ Object
readonly
Returns the value of attribute change.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
-
#open_interest ⇒ Object
readonly
Returns the value of attribute open_interest.
-
#strike ⇒ Object
readonly
Returns the value of attribute strike.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
-
#volume ⇒ Object
readonly
Returns the value of attribute volume.
Instance Method Summary collapse
- #==(option_quote) ⇒ Object
- #call? ⇒ Boolean
- #expiration_date ⇒ Object
- #put? ⇒ Boolean
- #underlier ⇒ Object
Methods inherited from Base
#[], #attr_equal, attr_reader, #attrs, #attrs_equal, from_response, #initialize, #update
Constructor Details
This class inherits a constructor from Tradier::Base
Instance Attribute Details
#ask ⇒ Object (readonly)
Returns the value of attribute ask.
7 8 9 |
# File 'lib/tradier/option_quote.rb', line 7 def ask @ask end |
#ask_size ⇒ Object (readonly)
Returns the value of attribute ask_size.
7 8 9 |
# File 'lib/tradier/option_quote.rb', line 7 def ask_size @ask_size end |
#bid ⇒ Object (readonly)
Returns the value of attribute bid.
7 8 9 |
# File 'lib/tradier/option_quote.rb', line 7 def bid @bid end |
#bid_size ⇒ Object (readonly)
Returns the value of attribute bid_size.
7 8 9 |
# File 'lib/tradier/option_quote.rb', line 7 def bid_size @bid_size end |
#change ⇒ Object (readonly)
Returns the value of attribute change.
7 8 9 |
# File 'lib/tradier/option_quote.rb', line 7 def change @change end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
7 8 9 |
# File 'lib/tradier/option_quote.rb', line 7 def last @last end |
#open_interest ⇒ Object (readonly)
Returns the value of attribute open_interest.
7 8 9 |
# File 'lib/tradier/option_quote.rb', line 7 def open_interest @open_interest end |
#strike ⇒ Object (readonly)
Returns the value of attribute strike.
7 8 9 |
# File 'lib/tradier/option_quote.rb', line 7 def strike @strike end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
7 8 9 |
# File 'lib/tradier/option_quote.rb', line 7 def symbol @symbol end |
#volume ⇒ Object (readonly)
Returns the value of attribute volume.
7 8 9 |
# File 'lib/tradier/option_quote.rb', line 7 def volume @volume end |
Instance Method Details
#==(option_quote) ⇒ Object
27 28 29 |
# File 'lib/tradier/option_quote.rb', line 27 def ==(option_quote) self.symbol == option_quote.symbol end |
#call? ⇒ Boolean
13 14 15 |
# File 'lib/tradier/option_quote.rb', line 13 def call? parsed_symbol.call? end |
#expiration_date ⇒ Object
21 22 23 24 25 |
# File 'lib/tradier/option_quote.rb', line 21 def expiration_date return unless @expiration_date || @attrs[:expiration_date] @expiration_date ||= Date.parse(@attrs[:expiration_date]) end |
#put? ⇒ Boolean
9 10 11 |
# File 'lib/tradier/option_quote.rb', line 9 def put? parsed_symbol.put? end |
#underlier ⇒ Object
17 18 19 |
# File 'lib/tradier/option_quote.rb', line 17 def underlier parsed_symbol.underlier end |