Class: Freckle::Entry

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



99
100
101
# File 'lib/freckle.rb', line 99

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

Instance Method Details

#project(options = {}) ⇒ Object



102
103
104
# File 'lib/freckle.rb', line 102

def project(options = {})
  @connection.projects(options).detect{ |project| project.id == self.project_id }
end

#user(options = {}) ⇒ Object



105
106
107
# File 'lib/freckle.rb', line 105

def user(options = {})
  @connection.users(options).detect{ |user| user.id == self.user_id }
end