Sha256: 40c89d1e0f85ef3d0021f16fc18b755da7d15f002bc2304998f2d19742a70955

Contents?: true

Size: 588 Bytes

Versions: 6

Compression:

Stored size: 588 Bytes

Contents

require 'hyperion/types/hyperion_uri'

class RestRoute
  attr_reader :method, :uri, :response_descriptor, :payload_descriptor

  # @param method [Symbol] the HTTP method
  # @param uri [String, URI]
  # @param response_descriptor [ResponseDescriptor]
  # @param payload_descriptor [PayloadDescriptor]
  def initialize(method, uri, response_descriptor=nil, payload_descriptor=nil)
    @method = method
    @uri = HyperionUri.new(uri)
    @response_descriptor = response_descriptor
    @payload_descriptor = payload_descriptor
  end

  def to_s
    "#{method.to_s.upcase} #{uri}"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hyperion_http-0.1.7 lib/hyperion/types/rest_route.rb
hyperion_http-0.1.6 lib/hyperion/types/rest_route.rb
hyperion_http-0.1.5 lib/hyperion/types/rest_route.rb
hyperion_http-0.1.4 lib/hyperion/types/rest_route.rb
hyperion_http-0.1.3 lib/hyperion/types/rest_route.rb
hyperion_http-0.1.2 lib/hyperion/types/rest_route.rb