Class: BloombergQuote::Quote
- Inherits:
-
Object
- Object
- BloombergQuote::Quote
- Defined in:
- lib/bloomberg_quote.rb
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(symbol) ⇒ Quote
constructor
A new instance of Quote.
- #valid? ⇒ Boolean
Constructor Details
#initialize(symbol) ⇒ Quote
Returns a new instance of Quote.
8 9 10 11 |
# File 'lib/bloomberg_quote.rb', line 8 def initialize(symbol) @symbol = symbol pull_data end |
Instance Method Details
#data ⇒ Object
18 19 20 |
# File 'lib/bloomberg_quote.rb', line 18 def data @data.nil? ? {} : @data end |
#valid? ⇒ Boolean
13 14 15 16 |
# File 'lib/bloomberg_quote.rb', line 13 def valid? return false unless @data @data.size > 0 end |