Class: Supa::Commands::Object

Inherits:
Supa::Command show all
Defined in:
lib/supa/commands/object.rb

Constant Summary

Constants inherited from Supa::Command

Supa::Command::UnsupportedModifier

Instance Method Summary collapse

Methods inherited from Supa::Command

#initialize

Constructor Details

This class inherits a constructor from Supa::Command

Instance Method Details

#representObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/supa/commands/object.rb', line 4

def represent
  return @tree[@name] = nil unless value || hide?
  return if hide?

  @tree[@name] = {}

  Supa::Builder.new(
    value,
    representer: @representer,
    tree: @tree[@name]
  ).instance_exec(&@block)
end