module Lasso::Model::InstanceMethods

Public Instance Methods

config(key) click to toggle source
# File lib/lasso/model/instance.rb, line 4
def config(key)
  oauth_providers[service][key]
end
duplicate() click to toggle source
# File lib/lasso/model/instance.rb, line 10
def duplicate
  self.class.find(:first, :conditions => ['service = ? and token_a = ?', service, token_a])
end
set_type() click to toggle source
# File lib/lasso/model/instance.rb, line 7
def set_type
  self.type ||= "OAuth#{config(:oauth_version) == 1 && 'One' || 'Two'}#{self.class.to_s}"
end