Module: BCDice::CommonCommand::Version

Defined in:
lib/bcdice/common_command/version.rb

Constant Summary collapse

PREFIX_PATTERN =
/BCDiceVersion/.freeze

Class Method Summary collapse

Class Method Details

.eval(command, _game_system, _randomizer) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/bcdice/common_command/version.rb', line 9

def eval(command, _game_system, _randomizer)
  command = command.split(" ", 2).first
  if command.match?(/^BCDiceVersion$/i)
    Result.new.tap do |r|
      r.text = "BCDice #{BCDice::VERSION}"
    end
  end
end