class Swagger::Schema::Server

Public Class Methods

new(schema) click to toggle source
# File lib/swagger/schema/server.rb, line 9
def initialize(schema)
  @schema = schema
end

Public Instance Methods

complete_url(url_variables = {}) click to toggle source
# File lib/swagger/schema/server.rb, line 15
def complete_url(url_variables = {})
  use_url = url
  (variables || {}).each do |name, options|
    variable = Util.try_hash(url_variables, name) || Util.try_hash(options, :default)
    use_url.gsub!("{#{name}}", variable.to_s)
  end
  use_url
end