Class: Orchestra::Conductor::ServiceRecorder::Wrapper
- Inherits:
-
Delegator
- Object
- Delegator
- Orchestra::Conductor::ServiceRecorder::Wrapper
- Defined in:
- lib/orchestra/conductor.rb
Instance Attribute Summary collapse
-
#service ⇒ Object
(also: #__getobj__)
Returns the value of attribute service.
Instance Method Summary collapse
-
#initialize(service, recording) ⇒ Wrapper
constructor
A new instance of Wrapper.
- #inspect ⇒ Object
- #kind_of?(klass) ⇒ Boolean
- #method_missing(meth, *args) ⇒ Object
Constructor Details
#initialize(service, recording) ⇒ Wrapper
Returns a new instance of Wrapper.
97 98 99 100 |
# File 'lib/orchestra/conductor.rb', line 97 def initialize service, recording super service @recording = recording end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
106 107 108 109 110 111 112 113 114 |
# File 'lib/orchestra/conductor.rb', line 106 def method_missing meth, *args super.tap do |result| @recording << { :method => meth.to_s, :input => args, :output => result, } end end |
Instance Attribute Details
#service ⇒ Object Also known as: __getobj__
Returns the value of attribute service.
93 94 95 |
# File 'lib/orchestra/conductor.rb', line 93 def service @service end |
Instance Method Details
#inspect ⇒ Object
116 117 118 |
# File 'lib/orchestra/conductor.rb', line 116 def inspect "#<#{self.class.name} service=#{service.inspect}>" end |
#kind_of?(klass) ⇒ Boolean
102 103 104 |
# File 'lib/orchestra/conductor.rb', line 102 def kind_of? klass super or service.kind_of? klass end |