Class: Fugle::Intraday::Trades Private
- Inherits:
-
Object
- Object
- Fugle::Intraday::Trades
- Includes:
- Enumerable, HTTP::API
- Defined in:
- lib/fugle/intraday/trades.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The Intraday Trades
Constant Summary
Constants included from HTTP::API
HTTP::API::ENDPOINT, HTTP::API::VERSION
Instance Method Summary collapse
- #each(&block) ⇒ Object private
-
#initialize(items) ⇒ Trades
constructor
private
A new instance of Trades.
-
#to_json(*args) ⇒ String
private
Convert to JSON.
Methods included from HTTP::API
Constructor Details
#initialize(items) ⇒ Trades
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Trades.
20 21 22 |
# File 'lib/fugle/intraday/trades.rb', line 20 def initialize(items) @items = items.map { |item| Trade.new(item) } end |
Instance Method Details
#each(&block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/fugle/intraday/trades.rb', line 26 def each(&block) @items.each(&block) end |
#to_json(*args) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Convert to JSON
36 37 38 |
# File 'lib/fugle/intraday/trades.rb', line 36 def to_json(*args) to_a.to_json(*args) end |