Sha256: d566146e5c447dc68ccc6028ee7d5479e51f57869224fd3e4160818f23b86462

Contents?: true

Size: 415 Bytes

Versions: 7

Compression:

Stored size: 415 Bytes

Contents

module Relax
  class Endpoint
    include Contextable

    attr_reader :url

    def initialize(service, url, options, &block)
      @service = service
      @url = url
      @options = options

      extend_context(service)
      instance_eval(&block)
    end

    def action(name, options={}, &block)
      action = Action.new(self, name, options, &block)
      @service.register_action(action)
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
tylerhunt-relax-0.1.1 lib/relax/endpoint.rb
tylerhunt-relax-0.1.2 lib/relax/endpoint.rb
tylerhunt-relax-0.1.3 lib/relax/endpoint.rb
relax-0.1.3 lib/relax/endpoint.rb
relax-0.1.2 lib/relax/endpoint.rb
relax-0.1.0 lib/relax/endpoint.rb
relax-0.1.1 lib/relax/endpoint.rb