Class: Supa::Commands::Collection
- Inherits:
-
Supa::Command
- Object
- Supa::Command
- Supa::Commands::Collection
- Defined in:
- lib/supa/commands/collection.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Supa::Command
Supa::Command::UnsupportedModifier
Instance Method Summary collapse
Methods inherited from Supa::Command
Constructor Details
This class inherits a constructor from Supa::Command
Instance Method Details
#represent ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/supa/commands/collection.rb', line 4 def represent return if hide? define_tree return unless value value.each do |element| @tree[@name] << {} Supa::Builder.new(element, representer: @representer, tree: @tree[@name][-1]).instance_exec(&@block) end end |