Class: Oso::Polar::Predicate
- Inherits:
-
Object
- Object
- Oso::Polar::Predicate
- Defined in:
- lib/oso/polar/predicate.rb
Overview
Polar predicate.
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Boolean (also: #eql?)
-
#initialize(name, args:) ⇒ Predicate
constructor
A new instance of Predicate.
Constructor Details
#initialize(name, args:) ⇒ Predicate
Returns a new instance of Predicate.
11 12 13 14 |
# File 'lib/oso/polar/predicate.rb', line 11 def initialize(name, args:) @name = name @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
7 8 9 |
# File 'lib/oso/polar/predicate.rb', line 7 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/oso/polar/predicate.rb', line 7 def name @name end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
18 19 20 |
# File 'lib/oso/polar/predicate.rb', line 18 def ==(other) name == other.name && args == other.args end |