Class: Summon::Log

Inherits:
Object show all
Defined in:
lib/summon/log.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#implObject (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

Returns:

  • (Boolean)


16
17
18
# File 'lib/summon/log.rb', line 16

def respond_to?(name)
  @impl.respond_to?(name) || super(name)
end