Class: Fathom::Fact
Instance Attribute Summary collapse
-
#value ⇒ Object
(also: #rand)
readonly
Returns the value of attribute value.
Attributes inherited from Node
#description, #distribution, #name, #values
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Fact
constructor
A new instance of Fact.
Methods inherited from Node
#add_child, #add_parent, #children, #inspect, #name_sym, #parents, #register_child, #register_parent, #simple_inspect
Constructor Details
#initialize(opts = {}) ⇒ Fact
Returns a new instance of Fact.
6 7 8 9 10 11 |
# File 'lib/fathom/node/fact.rb', line 6 def initialize(opts={}) symbolize_keys!(opts) @value = opts[:value] @value ||= opts[:values] super(opts) end |
Instance Attribute Details
#value ⇒ Object (readonly) Also known as: rand
Returns the value of attribute value.
4 5 6 |
# File 'lib/fathom/node/fact.rb', line 4 def value @value end |