Class: Factbase::Tee
- Inherits:
-
Object
- Object
- Factbase::Tee
- Defined in:
- lib/factbase/tee.rb
Overview
Tee of two facts.
- Author
-
Yegor Bugayenko ([email protected])
- Copyright
-
Copyright © 2024 Yegor Bugayenko
- License
-
MIT
Instance Method Summary collapse
- #all_properties ⇒ Object
-
#initialize(fact, upper) ⇒ Tee
constructor
Ctor.
- #to_s ⇒ Object
Constructor Details
#initialize(fact, upper) ⇒ Tee
Ctor.
35 36 37 38 |
# File 'lib/factbase/tee.rb', line 35 def initialize(fact, upper) @fact = fact @upper = upper end |
Instance Method Details
#all_properties ⇒ Object
44 45 46 |
# File 'lib/factbase/tee.rb', line 44 def all_properties @fact.all_properties + (@upper.is_a?(Hash) ? @upper.keys : @upper.all_properties) end |
#to_s ⇒ Object
40 41 42 |
# File 'lib/factbase/tee.rb', line 40 def to_s @fact.to_s end |