class TestML::Num

Public Instance Methods

bool() click to toggle source
# File lib/testml/runtime.rb, line 434
def bool
  @value != 0 ? TestML::Constant::True : TestML::Constant::False
end
list() click to toggle source
# File lib/testml/runtime.rb, line 437
def list
  list = []
  [1..(@value-1)].each { |i| list[i - 1] = nil }
end
num() click to toggle source
# File lib/testml/runtime.rb, line 431
def num
  self
end
str() click to toggle source
# File lib/testml/runtime.rb, line 428
def str
  TestML::Str.new(@value.to_s)
end