Class: Summon::Log
Instance Attribute Summary collapse
-
#impl ⇒ Object
readonly
Returns the value of attribute impl.
Instance Method Summary collapse
-
#initialize(spec = nil) ⇒ Log
constructor
A new instance of Log.
- #method_missing(name, *args, &block) ⇒ Object
- #respond_to?(name) ⇒ Boolean
Constructor Details
#initialize(spec = nil) ⇒ Log
Returns a new instance of Log.
8 9 10 |
# File 'lib/summon/log.rb', line 8 def initialize(spec = nil) @impl = create spec end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
12 13 14 |
# File 'lib/summon/log.rb', line 12 def method_missing(name, *args, &block) @impl.respond_to?(name) ? @impl.send(name, *args, &block) : super(name, *args, &block) end |
Instance Attribute Details
#impl ⇒ Object (readonly)
Returns the value of attribute impl.
6 7 8 |
# File 'lib/summon/log.rb', line 6 def impl @impl end |
Instance Method Details
#respond_to?(name) ⇒ Boolean
16 17 18 |
# File 'lib/summon/log.rb', line 16 def respond_to?(name) @impl.respond_to?(name) || super(name) end |