class Aptible::Gridiron::Resource
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
# File lib/aptible/gridiron/resource.rb, line 15 def initialize(options = {}) if options.is_a?(Hash) && options[:organization] options[:headers] ||= {} organization_href = options[:organization].href options[:headers]['X-Aptible-Organization'] = organization_href end super(options) end
Public Instance Methods
namespace()
click to toggle source
# File lib/aptible/gridiron/resource.rb, line 25 def namespace 'Aptible::Gridiron' end
organization()
click to toggle source
# File lib/aptible/gridiron/resource.rb, line 10 def organization # TODO: Is there another way to persist organization across children headers['X-Aptible-Organization'] end
outgoing_uri_filter(params)
click to toggle source
# File lib/aptible/gridiron/resource.rb, line 6 def outgoing_uri_filter(params) params.merge!(organization: organization) if organization end
root_url()
click to toggle source
# File lib/aptible/gridiron/resource.rb, line 29 def root_url Aptible::Gridiron.configuration.root_url end