Class Rools::Facts
In: lib/rools/facts.rb
Parent: Base

Methods

new   to_s   value  

Attributes

fact_value  [R] 
name  [R] 

Public Class methods

[Source]

    # File lib/rools/facts.rb, line 12
12:     def initialize(rule_set, name, b)
13:       @name = name
14:       @fact_value = instance_eval( &b )
15:       #logger.debug "New Facts: #{@fact_value}" if logger
16:     end

Public Instance methods

[Source]

    # File lib/rools/facts.rb, line 26
26:     def to_s
27:       "facts: #{name} #{fact_value.to_s}"
28:     end

[Source]

    # File lib/rools/facts.rb, line 18
18:     def value
19:       if @fact_value.size == 1
20:         @fact_value[0]
21:       else
22:         @fact_value
23:       end
24:     end

[Validate]