class SwaggerYard::PathItem
Attributes
api_group[RW]
operations[RW]
Public Class Methods
new(api_group = nil)
click to toggle source
# File lib/swagger_yard/path_item.rb, line 5 def initialize(api_group = nil) @api_group = api_group @operations = {} end
Public Instance Methods
+(other)
click to toggle source
# File lib/swagger_yard/path_item.rb, line 15 def +(other) PathItem.new(api_group).tap do |pi| pi.operations = operations.merge(other.operations) end end
add_operation(yard_object)
click to toggle source
# File lib/swagger_yard/path_item.rb, line 10 def add_operation(yard_object) operation = Operation.from_yard_object(yard_object, self) @operations[operation.http_method.downcase] = operation end