Class: WebServiceXStockQuote::Quote
- Inherits:
-
Object
- Object
- WebServiceXStockQuote::Quote
- Defined in:
- lib/webservicex_stock_quote.rb
Class Attribute Summary collapse
-
.client ⇒ Object
Returns the value of attribute client.
-
.parser ⇒ Object
Returns the value of attribute parser.
Class Method Summary collapse
Class Attribute Details
.client ⇒ Object
Returns the value of attribute client.
10 11 12 |
# File 'lib/webservicex_stock_quote.rb', line 10 def client @client end |
.parser ⇒ Object
Returns the value of attribute parser.
10 11 12 |
# File 'lib/webservicex_stock_quote.rb', line 10 def parser @parser end |
Class Method Details
.get(symbol) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/webservicex_stock_quote.rb', line 16 def Quote.get(symbol) response = @client.call(:get_quote, :message => { :symbol => symbol }) result = @parser.parse(response.body[:get_quote_response][:get_quote_result]) return result[:stock_quotes][:stock] end |