Class: Factbase::Tee

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(fact, upper) ⇒ Tee

Ctor.

Parameters:



35
36
37
38
# File 'lib/factbase/tee.rb', line 35

def initialize(fact, upper)
  @fact = fact
  @upper = upper
end

Instance Method Details

#all_propertiesObject



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_sObject



40
41
42
# File 'lib/factbase/tee.rb', line 40

def to_s
  @fact.to_s
end