Class: Angus::SDoc::Definitions::Operation
- Inherits:
-
Object
- Object
- Angus::SDoc::Definitions::Operation
- Defined in:
- lib/angus/definitions/operation.rb
Instance Attribute Summary collapse
-
#code_name ⇒ String
The code name of the message.
-
#description ⇒ String
The description of the operation.
-
#http_method ⇒ String
The HTTP method of the operation.
-
#messages ⇒ Hash<String, Message>
The messages associated with the operation.
-
#name ⇒ String
The name of the operation.
-
#path ⇒ String
The path of the operation.
-
#request_elements ⇒ Set<RequestElement>
The request elements of the operation.
-
#response_elements ⇒ Set<ResponseElement>
The response elements of the operation.
-
#uri_elements ⇒ Set<UriElement>
The uri elements of the operation.
Instance Method Summary collapse
-
#message(key, level) ⇒ Message
Returns the first message that matches the given key and level.
Instance Attribute Details
#code_name ⇒ String
Returns the code name of the message. It is a human readable unique identifier. It has to start with Mayus and it has to be camelcase.
12 13 14 |
# File 'lib/angus/definitions/operation.rb', line 12 def code_name @code_name end |
#description ⇒ String
Returns the description of the operation.
16 17 18 |
# File 'lib/angus/definitions/operation.rb', line 16 def description @description end |
#http_method ⇒ String
Returns the HTTP method of the operation.
24 25 26 |
# File 'lib/angus/definitions/operation.rb', line 24 def http_method @http_method end |
#messages ⇒ Hash<String, Message>
Returns the messages associated with the operation.
28 29 30 |
# File 'lib/angus/definitions/operation.rb', line 28 def @messages end |
#name ⇒ String
Returns the name of the operation.
7 8 9 |
# File 'lib/angus/definitions/operation.rb', line 7 def name @name end |
#path ⇒ String
Returns the path of the operation.
20 21 22 |
# File 'lib/angus/definitions/operation.rb', line 20 def path @path end |
#request_elements ⇒ Set<RequestElement>
Returns the request elements of the operation.
36 37 38 |
# File 'lib/angus/definitions/operation.rb', line 36 def request_elements @request_elements end |
#response_elements ⇒ Set<ResponseElement>
Returns the response elements of the operation.
40 41 42 |
# File 'lib/angus/definitions/operation.rb', line 40 def response_elements @response_elements end |
#uri_elements ⇒ Set<UriElement>
Returns the uri elements of the operation.
32 33 34 |
# File 'lib/angus/definitions/operation.rb', line 32 def uri_elements @uri_elements end |
Instance Method Details
#message(key, level) ⇒ Message
Returns the first message that matches the given key and level.
53 54 55 56 57 58 |
# File 'lib/angus/definitions/operation.rb', line 53 def (key, level) return nil if self..nil? level &&= level.downcase self..find { || .key == key && .level.downcase == level } end |