Class: IGMarkets::CLI::Tables::PositionsTable
- Defined in:
- lib/ig_markets/cli/tables/positions_table.rb
Overview
Helper class that prints out an array of Position instances in a table. Positions that share an EPIC can be aggregated into one row in the table if desired.
Instance Method Summary collapse
-
#initialize(models, options = {}) ⇒ PositionsTable
constructor
A new instance of PositionsTable.
Methods inherited from Table
Constructor Details
#initialize(models, options = {}) ⇒ PositionsTable
Returns a new instance of PositionsTable.
7 8 9 10 11 |
# File 'lib/ig_markets/cli/tables/positions_table.rb', line 7 def initialize(models, = {}) models = aggregated_positions(models) if [:aggregate] super models, end |