Class: Signpost::Endpoint::Action::Context
- Inherits:
-
Object
- Object
- Signpost::Endpoint::Action::Context
- Defined in:
- lib/signpost/endpoint/action.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
7 8 9 |
# File 'lib/signpost/endpoint/action.rb', line 7 def env @env end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
7 8 9 |
# File 'lib/signpost/endpoint/action.rb', line 7 def headers @headers end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'lib/signpost/endpoint/action.rb', line 7 def params @params end |
Instance Method Details
#body(text) ⇒ Object
9 10 11 |
# File 'lib/signpost/endpoint/action.rb', line 9 def body(text) @body = [text] end |
#expand(path, data = {}) ⇒ Object
17 18 19 |
# File 'lib/signpost/endpoint/action.rb', line 17 def (path, data={}) @router.(path, data) end |
#result ⇒ Object
21 22 23 |
# File 'lib/signpost/endpoint/action.rb', line 21 def result [@status, @headers, @body] end |
#status(code) ⇒ Object
13 14 15 |
# File 'lib/signpost/endpoint/action.rb', line 13 def status(code) @status = code.to_i end |