class RemoteResource::AttributeKey

Attributes

method[R]
named_resource[R]
prefix[R]

Public Class Methods

new(prefix, named_resource, scope, method) click to toggle source
# File lib/remote_resource/attribute_key.rb, line 5
def initialize(prefix, named_resource, scope, method)
  @prefix = prefix
  @named_resource = named_resource
  @scope = scope || {}
  @method = method
end

Public Instance Methods

for_attribute() click to toggle source
# File lib/remote_resource/attribute_key.rb, line 21
def for_attribute
  [@prefix, scope_string, @named_resource, @method].compact.join('/')
end
Also aliased as: to_s
for_resource() click to toggle source
# File lib/remote_resource/attribute_key.rb, line 16
def for_resource
  [@prefix, scope_string, @named_resource].compact.join('/')
end
Also aliased as: for_storage
for_storage()
Alias for: for_resource
scope_string() click to toggle source
# File lib/remote_resource/attribute_key.rb, line 12
def scope_string
  @scope.map { |k, v| "#{k}=#{v}" }.join('&')
end
to_s()
Alias for: for_attribute