Class: Commute::Layer

Inherits:
Struct
  • Object
show all
Defined in:
lib/commute/layer.rb

Overview

TODO:

more docs and tests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



4
5
6
# File 'lib/commute/layer.rb', line 4

def name
  @name
end

Instance Method Details

#request(request, options) ⇒ Object

Default request forwards to the call method.



7
8
9
# File 'lib/commute/layer.rb', line 7

def request request, options
  call request, options if respond_to? :call
end

#response(response, options) ⇒ Object

Default response forwards to the call method.



12
13
14
# File 'lib/commute/layer.rb', line 12

def response response, options
  call response, options if respond_to? :call
end