class Scale::Endpoints::Endpoint

Attributes

api[R]
args[R]
params[R]

Public Class Methods

match?(method) click to toggle source
# File lib/scale/endpoints/endpoint.rb, line 20
def self.match?(method)
  shortcut.to_s == method.to_s
end
new(api, *args) click to toggle source
# File lib/scale/endpoints/endpoint.rb, line 6
def initialize(api, *args)
  @api = api
  @args = args
  @params = Scale.hash(args.pop) if args.last.is_a?(Hash)
end
shortcut() click to toggle source
# File lib/scale/endpoints/endpoint.rb, line 16
def self.shortcut
  nil
end

Public Instance Methods

process() click to toggle source
# File lib/scale/endpoints/endpoint.rb, line 12
def process
  raise NotImplementedError
end

Protected Instance Methods

fetch_param(name) click to toggle source
# File lib/scale/endpoints/endpoint.rb, line 26
def fetch_param(name)
  params[name.to_s] || params[name.to_sym]
end