Class: TestML::Object
- Inherits:
-
Object
show all
- Defined in:
- lib/testml/runtime.rb
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(value) ⇒ Object
Returns a new instance of Object.
380
381
382
|
# File 'lib/testml/runtime.rb', line 380
def initialize(value)
@value = value
end
|
Instance Attribute Details
Returns the value of attribute value.
378
379
380
|
# File 'lib/testml/runtime.rb', line 378
def value
@value
end
|
Instance Method Details
396
397
398
|
# File 'lib/testml/runtime.rb', line 396
def bool
fail "Cast from #{type} to Bool is not supported"
end
|
399
400
401
|
# File 'lib/testml/runtime.rb', line 399
def list
fail "Cast from #{type} to List is not supported"
end
|
393
394
395
|
# File 'lib/testml/runtime.rb', line 393
def num
fail "Cast from #{type} to Num is not supported"
end
|
390
391
392
|
# File 'lib/testml/runtime.rb', line 390
def str
fail "Cast from #{type} to Str is not supported"
end
|
384
385
386
387
388
|
# File 'lib/testml/runtime.rb', line 384
def type
type = self.class.to_s
type.sub! /^TestML::/, '' or fail "Can't find type of '#{type}'"
return type
end
|