Class: Factbase::Logged::Fact

Inherits:
Object
  • Object
show all
Defined in:
lib/factbase/logged.rb

Overview

Fact decorator.

This is an internal class, it is not supposed to be instantiated directly.

Constant Summary collapse

MAX_LENGTH =
64

Instance Method Summary collapse

Constructor Details

#initialize(fact, tube: nil, log: nil) ⇒ Fact

Returns a new instance of Fact.



92
93
94
95
96
97
98
99
100
# File 'lib/factbase/logged.rb', line 92

def initialize(fact, tube: nil, log: nil)
  @fact = fact
  @tube =
    if log.nil?
      tube
    else
      Tube.new(log)
    end
end

Instance Method Details

#all_propertiesObject



106
107
108
# File 'lib/factbase/logged.rb', line 106

def all_properties
  @fact.all_properties
end

#to_sObject



102
103
104
# File 'lib/factbase/logged.rb', line 102

def to_s
  @fact.to_s
end