Class: BloombergQuote::Quote

Inherits:
Object
  • Object
show all
Defined in:
lib/bloomberg_quote.rb

Instance Method Summary collapse

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

#dataObject



18
19
20
# File 'lib/bloomberg_quote.rb', line 18

def data
  @data.nil? ? {} : @data
end

#valid?Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/bloomberg_quote.rb', line 13

def valid?
  return false unless @data
  @data.size > 0
end