Class: Picatrix::Cruddy
- Inherits:
-
Object
- Object
- Picatrix::Cruddy
- Defined in:
- lib/picatrix/cruddy.rb
Constant Summary collapse
- DEFAULT_CONTROLS =
iow if it is addressable it has a self
[:mason_self, :mason_up]
Instance Attribute Summary collapse
-
#controls ⇒ Object
Returns the value of attribute controls.
Instance Method Summary collapse
-
#initialize(edges) ⇒ Cruddy
constructor
A new instance of Cruddy.
Constructor Details
#initialize(edges) ⇒ Cruddy
Returns a new instance of Cruddy.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/picatrix/cruddy.rb', line 8 def initialize(edges) @controls = edges.inject({}) do |memo, edge| source = edge.keys.first target = edge[source][:target] next memo if source.upcase == "ROOT" memo[target] = appropriate_controls_for(target) memo end end |
Instance Attribute Details
#controls ⇒ Object
Returns the value of attribute controls.
3 4 5 |
# File 'lib/picatrix/cruddy.rb', line 3 def controls @controls end |