Class: Dox::Entities::Action
- Inherits:
-
Object
- Object
- Dox::Entities::Action
- Defined in:
- lib/dox/entities/action.rb
Instance Attribute Summary collapse
-
#desc ⇒ Object
readonly
Returns the value of attribute desc.
-
#examples ⇒ Object
Returns the value of attribute examples.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#uri_params ⇒ Object
readonly
Returns the value of attribute uri_params.
-
#verb ⇒ Object
readonly
Returns the value of attribute verb.
Instance Method Summary collapse
-
#initialize(name, details, request) ⇒ Action
constructor
A new instance of Action.
Constructor Details
#initialize(name, details, request) ⇒ Action
Returns a new instance of Action.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/dox/entities/action.rb', line 7 def initialize(name, details, request) @request = request @name = name @desc = details[:action_desc] @verb = details[:action_verb] || request.method @path = details[:action_path] || template_path @uri_params = details[:action_params] || template_path_params @examples = [] validate! end |
Instance Attribute Details
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
4 5 6 |
# File 'lib/dox/entities/action.rb', line 4 def desc @desc end |
#examples ⇒ Object
Returns the value of attribute examples.
5 6 7 |
# File 'lib/dox/entities/action.rb', line 5 def examples @examples end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/dox/entities/action.rb', line 4 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/dox/entities/action.rb', line 4 def path @path end |
#uri_params ⇒ Object (readonly)
Returns the value of attribute uri_params.
4 5 6 |
# File 'lib/dox/entities/action.rb', line 4 def uri_params @uri_params end |
#verb ⇒ Object (readonly)
Returns the value of attribute verb.
4 5 6 |
# File 'lib/dox/entities/action.rb', line 4 def verb @verb end |