Class: Fathom::Fact

Inherits:
Node
  • Object
show all
Defined in:
lib/fathom/node/fact.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#description, #distribution, #name, #values

Instance Method Summary collapse

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

#valueObject (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