module Locomotive::Steam::Models

Public Instance Methods

apply(attributes) click to toggle source
# File lib/locomotive/steam/models/scope.rb, line 28
def apply(attributes)
  attributes['site_id'] = @site._id
end
to_key() click to toggle source
# File lib/locomotive/steam/models/scope.rb, line 32
def to_key
  (@site ? ['site', @site._id] : []).tap do |base|
    @context.each do |name, object|
      base << [name, object.try(:_id)]
    end
  end.flatten.join('_')
end