Module: Sanford::Host::ClassMethods
- Defined in:
- lib/sanford/host.rb
Instance Method Summary collapse
- #method_missing(method, *args, &block) ⇒ Object
-
#name(*args) ⇒ Object
‘name` is defined by all objects, so we can’t rely on ‘method_missing`.
- #respond_to?(method) ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
128 129 130 |
# File 'lib/sanford/host.rb', line 128 def method_missing(method, *args, &block) self.instance.send(method, *args, &block) end |
Instance Method Details
#name(*args) ⇒ Object
‘name` is defined by all objects, so we can’t rely on ‘method_missing`
124 125 126 |
# File 'lib/sanford/host.rb', line 124 def name(*args) self.instance.name(*args) end |
#respond_to?(method) ⇒ Boolean
132 133 134 |
# File 'lib/sanford/host.rb', line 132 def respond_to?(method) super || self.instance.respond_to?(method) end |