Class: Freckly::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/freckly/project.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_hashie) ⇒ Project

Returns a new instance of Project.



19
20
21
# File 'lib/freckly/project.rb', line 19

def initialize(project_hashie)
  @project_hashie = project_hashie
end

Class Method Details

.allObject



4
5
6
# File 'lib/freckly/project.rb', line 4

def all
  get_all.map {|entry| new(entry) }
end

.countObject



8
9
10
# File 'lib/freckly/project.rb', line 8

def count
   get_all.size
end

Instance Method Details

#entries(options = {}) ⇒ Object



23
24
25
# File 'lib/freckly/project.rb', line 23

def entries(options={})
  Entry.all(options.merge(:projects => id))
end