Class: OasCore::Spec::PathItem
- Inherits:
-
Object
- Object
- OasCore::Spec::PathItem
- Includes:
- Specable
- Defined in:
- lib/oas_core/spec/path_item.rb
Instance Attribute Summary collapse
-
#delete ⇒ Object
readonly
Returns the value of attribute delete.
-
#get ⇒ Object
readonly
Returns the value of attribute get.
-
#patch ⇒ Object
readonly
Returns the value of attribute patch.
-
#post ⇒ Object
readonly
Returns the value of attribute post.
-
#put ⇒ Object
readonly
Returns the value of attribute put.
Instance Method Summary collapse
- #add_operation(http_method, operation) ⇒ Object
-
#initialize(specification) ⇒ PathItem
constructor
A new instance of PathItem.
- #oas_fields ⇒ Object
Methods included from Specable
Constructor Details
#initialize(specification) ⇒ PathItem
Returns a new instance of PathItem.
9 10 11 12 13 14 15 16 |
# File 'lib/oas_core/spec/path_item.rb', line 9 def initialize(specification) @specification = specification @get = nil @post = nil @put = nil @patch = nil @delete = nil end |
Instance Attribute Details
#delete ⇒ Object (readonly)
Returns the value of attribute delete.
7 8 9 |
# File 'lib/oas_core/spec/path_item.rb', line 7 def delete @delete end |
#get ⇒ Object (readonly)
Returns the value of attribute get.
7 8 9 |
# File 'lib/oas_core/spec/path_item.rb', line 7 def get @get end |
#patch ⇒ Object (readonly)
Returns the value of attribute patch.
7 8 9 |
# File 'lib/oas_core/spec/path_item.rb', line 7 def patch @patch end |
#post ⇒ Object (readonly)
Returns the value of attribute post.
7 8 9 |
# File 'lib/oas_core/spec/path_item.rb', line 7 def post @post end |
#put ⇒ Object (readonly)
Returns the value of attribute put.
7 8 9 |
# File 'lib/oas_core/spec/path_item.rb', line 7 def put @put end |
Instance Method Details
#add_operation(http_method, operation) ⇒ Object
18 19 20 |
# File 'lib/oas_core/spec/path_item.rb', line 18 def add_operation(http_method, operation) instance_variable_set("@#{http_method}", operation) end |
#oas_fields ⇒ Object
22 23 24 |
# File 'lib/oas_core/spec/path_item.rb', line 22 def oas_fields OasCore.config.http_verbs end |