class Swagger::Api
Public Class Methods
new(path, opts)
click to toggle source
# File lib/swagger/api.rb, line 3 def initialize path, opts defaults = { :path => path, :operations => []} @values = defaults.merge opts end
Public Instance Methods
as_json(options)
click to toggle source
# File lib/swagger/api.rb, line 20 def as_json options @values.as_json options end
operations(http_methods, opts = {}) { |o| ... }
click to toggle source
# File lib/swagger/api.rb, line 14 def operations http_methods, opts = {} operations = Array(http_methods).map { |m| Operation.new self, m, opts } operations.each { |o| yield(o) } @values[:operations].concat operations end
path()
click to toggle source
# File lib/swagger/api.rb, line 10 def path @values[:path] end