Class: Hodlmoon::Table
- Inherits:
-
Object
- Object
- Hodlmoon::Table
- Defined in:
- lib/hodlmoon/table.rb
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(info, currency) ⇒ Table
constructor
A new instance of Table.
Constructor Details
#initialize(info, currency) ⇒ Table
Returns a new instance of Table.
9 10 11 12 |
# File 'lib/hodlmoon/table.rb', line 9 def initialize(info, currency) @info = info @currency = currency end |
Class Method Details
.build(info, currency) ⇒ Object
5 6 7 |
# File 'lib/hodlmoon/table.rb', line 5 def self.build(info, currency) new(info, currency).build end |
Instance Method Details
#build ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/hodlmoon/table.rb', line 14 def build Terminal::Table.new do |t| t.title = '☾ ☾ ☾ Hodlmoon ☽ ☽ ☽' t.headings = humanised_headings t.rows = rows t.style = { all_separators: true, border_x: '=', border_i: 'O', alignment: :center } end end |