Class: TestML::Bool

Inherits:
Object show all
Defined in:
lib/testml/runtime.rb

Overview


Instance Attribute Summary

Attributes inherited from Object

#value

Instance Method Summary collapse

Methods inherited from Object

#initialize, #list, #none, #type

Constructor Details

This class inherits a constructor from TestML::Object

Instance Method Details

#boolObject



451
452
453
# File 'lib/testml/runtime.rb', line 451

def bool
  self
end

#numObject



448
449
450
# File 'lib/testml/runtime.rb', line 448

def num
  TestML::Num.new(@value ? 1 : 0)
end

#strObject



445
446
447
# File 'lib/testml/runtime.rb', line 445

def str
  TestML::Str.new(@value ? "1" : "")
end