Class: ConvenientService::Utils::Proc::ExecConfig Private
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::Proc::ExecConfig
- Defined in:
- lib/convenient_service/utils/proc/exec_config.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.
Instance Attribute Summary collapse
- #object ⇒ Object readonly private
- #proc ⇒ Object readonly private
Instance Method Summary collapse
-
#call ⇒ Object
private
Can be any type.
- #initialize(proc, object) ⇒ void constructor private
Methods inherited from Support::Command
Constructor Details
#initialize(proc, object) ⇒ void
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.
29 30 31 32 |
# File 'lib/convenient_service/utils/proc/exec_config.rb', line 29 def initialize(proc, object) @proc = proc @object = object end |
Instance Attribute Details
#object ⇒ 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.
16 17 18 |
# File 'lib/convenient_service/utils/proc/exec_config.rb', line 16 def object @object end |
#proc ⇒ 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.
22 23 24 |
# File 'lib/convenient_service/utils/proc/exec_config.rb', line 22 def proc @proc end |
Instance Method Details
#call ⇒ 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.
Second form allows to access methods from the enclosing context (like test in examples).
Returns Can be any type.
76 77 78 |
# File 'lib/convenient_service/utils/proc/exec_config.rb', line 76 def call proc_has_one_positional_argument? ? proc.call(object) : object.instance_exec(&proc) end |