class Angus::SDoc::Definitions::Operation
Attributes
code_name[RW]
@!attribute [rw] code_name
@return [String] 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.
description[RW]
@!attribute [rw] description
@return [String] the description of the operation.
http_method[RW]
@!attribute [rw] http_method
@return [String] the HTTP method of the operation.
messages[RW]
@!attribute [rw] messages
@return [Hash<String, Message>] the messages associated with the operation.
name[RW]
@!attribute [rw] name
@return [String] the name of the operation.
path[RW]
@!attribute [rw] path
@return [String] the path of the operation.
request_elements[RW]
@!attribute [rw] request_elements
@return [Set<RequestElement>] the request elements of the operation.
response_elements[RW]
@!attribute [rw] response_elements
@return [Set<ResponseElement>] the response elements of the operation.
uri_elements[RW]
@!attribute [rw] uri_elements
@return [Set<UriElement>] the uri elements of the operation.
Public Instance Methods
message(key, level)
click to toggle source
Returns the first message that matches the given key and level.
@param [String] key The key of the message. @param [String] level The level of the message.
Possible values are the *_LEVEL constants from {Message}.
@return [Message] the message or nil if no one matches.
# File lib/angus/definitions/operation.rb, line 53 def message(key, level) return nil if self.messages.nil? level &&= level.downcase self.messages.find { |message| message.key == key && message.level.downcase == level } end