Class: TWKB::App

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ App

Returns a new instance of App.



10
11
12
13
14
# File 'lib/twkb.rb', line 10

def initialize(options)
  @config = TWKB::Config.new
  @board_name = get_board_name options[:board_name]
  populate_stages
end

Instance Attribute Details

#board_nameObject

Returns the value of attribute board_name.



8
9
10
# File 'lib/twkb.rb', line 8

def board_name
  @board_name
end

#configObject

Returns the value of attribute config.



7
8
9
# File 'lib/twkb.rb', line 7

def config
  @config
end

Instance Method Details



16
17
18
19
# File 'lib/twkb.rb', line 16

def print_table
  formatter = TWKB::Formatter.new(:title => @board_name, :stages => @config.stages, :cell_width => @config['view.cell_width'])
  puts formatter.table
end