Class: BCDice::Arithmetic::Node::Number

Inherits:
Object
  • Object
show all
Defined in:
lib/bcdice/arithmetic/node.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Number

Returns a new instance of Number.



206
207
208
# File 'lib/bcdice/arithmetic/node.rb', line 206

def initialize(value)
  @value = value
end

Instance Method Details

#eval(_round_type) ⇒ Object



210
211
212
# File 'lib/bcdice/arithmetic/node.rb', line 210

def eval(_round_type)
  @value
end

#outputString Also known as: s_exp

Returns メッセージへの出力.

Returns:

  • (String)

    メッセージへの出力



215
216
217
# File 'lib/bcdice/arithmetic/node.rb', line 215

def output
  @value.to_s
end