module Stir::Endpoints
Public Class Methods
included(base)
click to toggle source
# File lib/stir/rest/endpoints.rb, line 4 def self.included(base) base.extend(ClassMethods) end
Public Instance Methods
routes(name, *args)
click to toggle source
# File lib/stir/rest/endpoints.rb, line 8 def routes(name, *args) endpoints = self.class.send(:endpoints) endpoint = nil endpoints.each {|x| endpoint = x[name.to_sym] if x[name.to_sym]} return nil if endpoint.nil? base_uri + endpoint.interpolate(args.first) end