Class: BCDice::GameSystem::OneWayHeroics::MoveToTable

Inherits:
Object
  • Object
show all
Defined in:
lib/bcdice/game_system/one_way_heroics/tables.rb

Instance Method Summary collapse

Constructor Details

#initialize(text, table_key) ⇒ MoveToTable

Returns a new instance of MoveToTable.



48
49
50
51
# File 'lib/bcdice/game_system/one_way_heroics/tables.rb', line 48

def initialize(text, table_key)
  @text = text
  @table_key = table_key
end

Instance Method Details

#roll(randomizer) ⇒ Object



53
54
55
56
57
58
# File 'lib/bcdice/game_system/one_way_heroics/tables.rb', line 53

def roll(randomizer)
  <<~RESULT.chomp
    #{@text}     #{@table_key}#{TABLES[@table_key].roll(randomizer)}
  RESULT
end