Class: ROM::CommandProxy Private
- Inherits:
-
Object
- Object
- ROM::CommandProxy
- Defined in:
- core/lib/rom/command_proxy.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
TODO: look into making command graphs work without the root key in the input so that we can get rid of this wrapper
Instance Attribute Summary collapse
- #command ⇒ Object readonly private
- #root ⇒ Object readonly private
Instance Method Summary collapse
- #>>(other) ⇒ Object private
- #call(input) ⇒ Object private
-
#initialize(command, root = Inflector.singularize(command.name.relation).to_sym) ⇒ CommandProxy
constructor
private
A new instance of CommandProxy.
- #restrictible? ⇒ Boolean private
Constructor Details
#initialize(command, root = Inflector.singularize(command.name.relation).to_sym) ⇒ CommandProxy
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CommandProxy.
14 15 16 17 |
# File 'core/lib/rom/command_proxy.rb', line 14 def initialize(command, root = Inflector.singularize(command.name.relation).to_sym) @command = command @root = root end |
Instance Attribute Details
#command ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'core/lib/rom/command_proxy.rb', line 11 def command @command end |
#root ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'core/lib/rom/command_proxy.rb', line 11 def root @root end |
Instance Method Details
#>>(other) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 |
# File 'core/lib/rom/command_proxy.rb', line 25 def >>(other) self.class.new(command >> other) end |
#call(input) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'core/lib/rom/command_proxy.rb', line 20 def call(input) command.call(root => input) end |
#restrictible? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'core/lib/rom/command_proxy.rb', line 30 def restrictible? command.restrictible? end |