Class: Canson::Responder

Inherits:
Object
  • Object
show all
Defined in:
lib/canson/responder.rb

Overview

responsible to return the block

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method = nil, &block) ⇒ Responder

Returns a new instance of Responder.



9
10
11
12
# File 'lib/canson/responder.rb', line 9

def initialize(method = nil, &block)
  @method = method
  @response_handler = block
end

Instance Attribute Details

#base=(value) ⇒ Object (writeonly)

Sets the attribute base

Parameters:

  • value

    the value to set the attribute base to.



7
8
9
# File 'lib/canson/responder.rb', line 7

def base=(value)
  @base = value
end

#methodObject (readonly)

Returns the value of attribute method.



6
7
8
# File 'lib/canson/responder.rb', line 6

def method
  @method
end

#response_handlerObject (readonly)

Returns the value of attribute response_handler.



6
7
8
# File 'lib/canson/responder.rb', line 6

def response_handler
  @response_handler
end

Instance Method Details

#callObject



14
15
16
# File 'lib/canson/responder.rb', line 14

def call
  @response_handler
end