Class: Freckle::User

Inherits:
Base
  • Object
show all
Defined in:
lib/freckle.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#<=>, first, #id, #initialize, #method_missing

Constructor Details

This class inherits a constructor from Freckle::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Freckle::Base

Class Method Details

.all(options = {}) ⇒ Object



85
86
87
# File 'lib/freckle.rb', line 85

def self.all(options = {})
  super(:users, options)
end

.by_email(email) ⇒ Object



88
89
90
# File 'lib/freckle.rb', line 88

def self.by_email(email)
  Freckle.connection.user_by_email(email)
end

Instance Method Details

#entries(options = {}) ⇒ Object



91
92
93
94
95
# File 'lib/freckle.rb', line 91

def entries(options = {})
  people = (options.delete(:people) || [])
  people.push(self.id) unless people.include?(self.id)
  @connection.entries(options.merge(:people => people))
end