Class: RuleEngine::Fact
- Inherits:
-
Object
- Object
- RuleEngine::Fact
- Defined in:
- lib/cirrocumulus/rules/engine.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#is_deleted ⇒ Object
Returns the value of attribute is_deleted.
Instance Method Summary collapse
-
#initialize(data, time, options) ⇒ Fact
constructor
A new instance of Fact.
- #timed_out? ⇒ Boolean
Constructor Details
#initialize(data, time, options) ⇒ Fact
Returns a new instance of Fact.
21 22 23 24 25 |
# File 'lib/cirrocumulus/rules/engine.rb', line 21 def initialize(data, time, ) @data = data @time = time @options = end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
27 28 29 |
# File 'lib/cirrocumulus/rules/engine.rb', line 27 def data @data end |
#is_deleted ⇒ Object
Returns the value of attribute is_deleted.
28 29 30 |
# File 'lib/cirrocumulus/rules/engine.rb', line 28 def is_deleted @is_deleted end |
Instance Method Details
#timed_out? ⇒ Boolean
30 31 32 33 |
# File 'lib/cirrocumulus/rules/engine.rb', line 30 def timed_out? return false if @options[:expires] == nil @time + @options[:expires] < Time.now end |