class Crapshoot::Tokens::Constant

Public Class Methods

new(number) click to toggle source
# File lib/crapshoot/tokens/constant.rb, line 4
def initialize(number)
  @value = Result.new number.to_i
  @value.description = @value.to_s
  @value.detailed_description = [[@value.to_s, @value.to_s]]
end

Public Instance Methods

eval(stack) click to toggle source
# File lib/crapshoot/tokens/constant.rb, line 10
def eval(stack)
  return @value
end
inspect() click to toggle source
# File lib/crapshoot/tokens/constant.rb, line 14
def inspect
  "<Crapshoot::Tokens::Constant value=#{@value}>"
end