travis-api/lib/travis/api/app/responders/base.rb

36 lines
556 B
Ruby

module Travis::Api::App::Responders
class Base
attr_reader :endpoint, :resource, :options
def initialize(endpoint, resource, options = {})
@endpoint = endpoint
@resource = resource
@options = options
end
def halt(*args)
endpoint.halt(*args)
end
def send_file(*args)
endpoint.send_file(*args)
end
def flash
endpoint.flash
end
def request
endpoint.request
end
def params
endpoint.params
end
def headers
endpoint.headers
end
end
end