Class: Canson::Responder
- Inherits:
-
Object
- Object
- Canson::Responder
- Defined in:
- lib/canson/responder.rb
Overview
responsible to return the block
Instance Attribute Summary collapse
-
#base ⇒ Object
writeonly
Sets the attribute base.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#response_handler ⇒ Object
readonly
Returns the value of attribute response_handler.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(method = nil, &block) ⇒ Responder
constructor
A new instance of Responder.
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
7 8 9 |
# File 'lib/canson/responder.rb', line 7 def base=(value) @base = value end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
6 7 8 |
# File 'lib/canson/responder.rb', line 6 def method @method end |
#response_handler ⇒ Object (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
#call ⇒ Object
14 15 16 |
# File 'lib/canson/responder.rb', line 14 def call @response_handler end |