class BCDice::Arithmetic::Node::Parenthesis

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

Public Class Methods

new(expr) click to toggle source

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

# File lib/bcdice/arithmetic/node.rb, line 184
def initialize(expr)
  @expr = expr
end

Public Instance Methods

eval(round_type) click to toggle source

@param round_type [Symbol] 端数処理方法 @return [Integer] 評価結果

# File lib/bcdice/arithmetic/node.rb, line 190
def eval(round_type)
  @expr.eval(round_type)
end
output() click to toggle source

@return [String] メッセージへの出力

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

@return [String] S式

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