Class: Harvest::Resources::Person

Inherits:
HarvestResource show all
Includes:
Plugins::Toggleable
Defined in:
lib/harvest/resources/person.rb

Instance Method Summary collapse

Methods included from Plugins::Toggleable

#toggle

Methods included from Plugins::ActiveResourceInheritableHeaders

included

Instance Method Details

#entries(options = {}) ⇒ Object

Find all entries for the given person; options and options are required; include options to limit by a specific project.



9
10
11
12
13
14
# File 'lib/harvest/resources/person.rb', line 9

def entries(options={})
  validate_options(options)
  entry_class = Harvest::Resources::Entry.clone
  entry_class.person_id = self.id
  entry_class.find :all, :params => format_params(options)
end

#expenses(options = {}) ⇒ Object



16
17
18
19
20
21
# File 'lib/harvest/resources/person.rb', line 16

def expenses(options={})
  validate_options(options)
  expense_class = Harvest::Resources::Expense.clone
  expense_class.person_id = self.id
  expense_class.find :all, :params => format_params(options)
end