Class: Supa::Commands::Polymorphic
- Inherits:
-
Supa::Command
- Object
- Supa::Command
- Supa::Commands::Polymorphic
- Defined in:
- lib/supa/commands/polymorphic.rb
Instance Method Summary collapse
Methods inherited from Supa::Command
Constructor Details
This class inherits a constructor from Supa::Command
Instance Method Details
#represent ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/supa/commands/polymorphic.rb', line 6 def represent tree[name] ||= [] Array(get_value).each do |element| tree[name] << {} Supa::Builder.new(context: element, tree: tree[name][-1]).instance_exec(&block) end end |