Class: RushCheck::Property

Inherits:
Object
  • Object
show all
Includes:
Testable
Defined in:
lib/rushcheck/property.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Testable

#check, #classify, #imply, #label, #run, #run_tests, #silent_check, #test, #testcase, #trivial

Constructor Details

#initialize(obj = nil, stamp = [], arguments = []) ⇒ Property

Returns a new instance of Property.



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/rushcheck/property.rb', line 15

def initialize(obj=nil, stamp=[], arguments=[])
  case obj
  when nil, true, false
    result = RushCheck::Result.new(obj, stamp, arguments)
    @gen   = RushCheck::Gen.unit(result)
  when Gen
    @gen = obj
  else
    raise(RuntimeError, "illegal arguments")
  end
end

Instance Attribute Details

#genObject (readonly)

Returns the value of attribute gen.



14
15
16
# File 'lib/rushcheck/property.rb', line 14

def gen
  @gen
end

Instance Method Details

#propertyObject



27
28
29
# File 'lib/rushcheck/property.rb', line 27

def property
  self
end