Class: Useless::Doc::Action
- Inherits:
-
Object
- Object
- Useless::Doc::Action
- Defined in:
- lib/useless/doc/action.rb
Overview
Documentation for an action on a API resource.
Defined Under Namespace
Modules: Method
Instance Attribute Summary collapse
-
#authentication_required ⇒ Boolean
readonly
Whether or not the user needs to authenticate in order to perform this action.
-
#description ⇒ String
readonly
A description of the action.
-
#method ⇒ String
readonly
The action’s HTTP method.
-
#request ⇒ Request
readonly
The request documentation for the action.
-
#response ⇒ Response
readonly
The response documentation for the action.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Action
constructor
A new instance of Action.
Constructor Details
#initialize(attrs = {}) ⇒ Action
41 42 43 44 45 46 47 |
# File 'lib/useless/doc/action.rb', line 41 def initialize(attrs = {}) @description = attrs[:description] @method = attrs[:method] @authentication_required = attrs[:authentication_required] @request = attrs[:request] @response = attrs[:response] end |
Instance Attribute Details
#authentication_required ⇒ Boolean (readonly)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/useless/doc/action.rb', line 23 class Action module Method GET = 'GET' HEAD = 'HEAD' POST = 'POST' PUT = 'PUT' PATCH = 'PATCH' DELETE = 'DELETE' TRACE = 'TRACE' CONNECT = 'CONNECT' end attr_reader :description, :method, :authentication_required, :request, :response # @param [Hash] attrs corresponds to the class's instance attributes. # def initialize(attrs = {}) @description = attrs[:description] @method = attrs[:method] @authentication_required = attrs[:authentication_required] @request = attrs[:request] @response = attrs[:response] end end |
#description ⇒ String (readonly)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/useless/doc/action.rb', line 23 class Action module Method GET = 'GET' HEAD = 'HEAD' POST = 'POST' PUT = 'PUT' PATCH = 'PATCH' DELETE = 'DELETE' TRACE = 'TRACE' CONNECT = 'CONNECT' end attr_reader :description, :method, :authentication_required, :request, :response # @param [Hash] attrs corresponds to the class's instance attributes. # def initialize(attrs = {}) @description = attrs[:description] @method = attrs[:method] @authentication_required = attrs[:authentication_required] @request = attrs[:request] @response = attrs[:response] end end |
#method ⇒ String (readonly)
Returns the action’s HTTP method.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/useless/doc/action.rb', line 23 class Action module Method GET = 'GET' HEAD = 'HEAD' POST = 'POST' PUT = 'PUT' PATCH = 'PATCH' DELETE = 'DELETE' TRACE = 'TRACE' CONNECT = 'CONNECT' end attr_reader :description, :method, :authentication_required, :request, :response # @param [Hash] attrs corresponds to the class's instance attributes. # def initialize(attrs = {}) @description = attrs[:description] @method = attrs[:method] @authentication_required = attrs[:authentication_required] @request = attrs[:request] @response = attrs[:response] end end |
#request ⇒ Request (readonly)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/useless/doc/action.rb', line 23 class Action module Method GET = 'GET' HEAD = 'HEAD' POST = 'POST' PUT = 'PUT' PATCH = 'PATCH' DELETE = 'DELETE' TRACE = 'TRACE' CONNECT = 'CONNECT' end attr_reader :description, :method, :authentication_required, :request, :response # @param [Hash] attrs corresponds to the class's instance attributes. # def initialize(attrs = {}) @description = attrs[:description] @method = attrs[:method] @authentication_required = attrs[:authentication_required] @request = attrs[:request] @response = attrs[:response] end end |
#response ⇒ Response (readonly)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/useless/doc/action.rb', line 23 class Action module Method GET = 'GET' HEAD = 'HEAD' POST = 'POST' PUT = 'PUT' PATCH = 'PATCH' DELETE = 'DELETE' TRACE = 'TRACE' CONNECT = 'CONNECT' end attr_reader :description, :method, :authentication_required, :request, :response # @param [Hash] attrs corresponds to the class's instance attributes. # def initialize(attrs = {}) @description = attrs[:description] @method = attrs[:method] @authentication_required = attrs[:authentication_required] @request = attrs[:request] @response = attrs[:response] end end |