Class: Predicated::Binary
- Includes:
- Enumerable, FlipThroughMe, ValueEquality, PrintSupport
- Defined in:
- lib/predicated/print.rb,
lib/predicated/predicate.rb
Defined Under Namespace
Modules: FlipThroughMe, ValueEquality
Instance Attribute Summary collapse
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(left, right) ⇒ Binary
constructor
A new instance of Binary.
- #to_s ⇒ Object
Methods included from ValueEquality
Methods included from FlipThroughMe
Methods included from PrintSupport
Methods inherited from Predicate
from_callable_object, from_json_str, from_json_struct, from_ruby_code_string, from_url_part, from_xml
Constructor Details
#initialize(left, right) ⇒ Binary
Returns a new instance of Binary.
45 46 47 48 |
# File 'lib/predicated/predicate.rb', line 45 def initialize(left, right) @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left.
43 44 45 |
# File 'lib/predicated/predicate.rb', line 43 def left @left end |
#right ⇒ Object
Returns the value of attribute right.
43 44 45 |
# File 'lib/predicated/predicate.rb', line 43 def right @right end |
Instance Method Details
#to_s ⇒ Object
40 41 42 |
# File 'lib/predicated/print.rb', line 40 def to_s "#{self.class.shorthand}(#{part_to_s(left)},#{part_to_s(right)})" end |