Class: HybridForest::Trees::Tests::Test
- Inherits:
-
Object
- Object
- HybridForest::Trees::Tests::Test
- Defined in:
- lib/hybridforest/trees/tests/test.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#feature ⇒ Object
readonly
Returns the value of attribute feature.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #description ⇒ Object
- #hash ⇒ Object
-
#initialize(feature, value) ⇒ Test
constructor
A new instance of Test.
- #passed_by?(_instance) ⇒ Boolean
Constructor Details
#initialize(feature, value) ⇒ Test
Returns a new instance of Test.
9 10 11 12 |
# File 'lib/hybridforest/trees/tests/test.rb', line 9 def initialize(feature, value) @feature = feature @value = value end |
Instance Attribute Details
#feature ⇒ Object (readonly)
Returns the value of attribute feature.
7 8 9 |
# File 'lib/hybridforest/trees/tests/test.rb', line 7 def feature @feature end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/hybridforest/trees/tests/test.rb', line 7 def value @value end |
Instance Method Details
#description ⇒ Object
18 19 20 |
# File 'lib/hybridforest/trees/tests/test.rb', line 18 def description raise NotImplementedError end |
#hash ⇒ Object
22 23 24 |
# File 'lib/hybridforest/trees/tests/test.rb', line 22 def hash feature.hash ^ value.hash end |
#passed_by?(_instance) ⇒ Boolean
14 15 16 |
# File 'lib/hybridforest/trees/tests/test.rb', line 14 def passed_by?(_instance) raise NotImplementedError end |