class BCDice::CommonCommand::AddDice::Node::Parenthesis

カッコで式をまとめるノード

Public Class Methods

new(expr) click to toggle source

@param expr [Object] カッコ内のノード

# File lib/bcdice/common_command/add_dice/node.rb, line 562
def initialize(expr)
  @expr = expr
end

Public Instance Methods

eval(game_system, randomizer) click to toggle source

@param randomizer [Randomizer] @return [integer]

# File lib/bcdice/common_command/add_dice/node.rb, line 568
def eval(game_system, randomizer)
  @expr.eval(game_system, randomizer)
end
expr(game_system) click to toggle source

@return [String]

# File lib/bcdice/common_command/add_dice/node.rb, line 578
def expr(game_system)
  "(#{@expr.expr(game_system)})"
end
include_dice?() click to toggle source

@return [Boolean]

# File lib/bcdice/common_command/add_dice/node.rb, line 573
def include_dice?
  @expr.include_dice?
end
output() click to toggle source

@return [String]

# File lib/bcdice/common_command/add_dice/node.rb, line 583
def output
  "(#{@expr.output})"
end
s_exp() click to toggle source

@return [String] S式

# File lib/bcdice/common_command/add_dice/node.rb, line 588
def s_exp
  "(Parenthesis #{@expr.s_exp})"
end