Class: ArtisanMemoryRepository::ChangeRepository
- Inherits:
-
Object
- Object
- ArtisanMemoryRepository::ChangeRepository
show all
- Includes:
- BaseRepository
- Defined in:
- lib/artisan-memory-repository/change_repository.rb
Instance Method Summary
collapse
#create, #delete, #destroy_all, #find, #find_each, #records, #save, #where
Instance Method Details
#create_iteration_change(attributes = {}) ⇒ Object
16
17
18
|
# File 'lib/artisan-memory-repository/change_repository.rb', line 16
def create_iteration_change(attributes = {})
create(attributes.merge({:type => "IterationChange"}))
end
|
#create_project_change(attributes = {}) ⇒ Object
12
13
14
|
# File 'lib/artisan-memory-repository/change_repository.rb', line 12
def create_project_change(attributes = {})
create(attributes.merge({:type => "ProjectChange"}))
end
|
#create_story_change(attributes = {}) ⇒ Object
21
22
23
|
# File 'lib/artisan-memory-repository/change_repository.rb', line 21
def create_story_change(attributes = {})
create(attributes.merge({:type => "StoryChange"}))
end
|
#find_all_by_project_id(project_id) ⇒ Object
26
27
28
|
# File 'lib/artisan-memory-repository/change_repository.rb', line 26
def find_all_by_project_id(project_id)
records.values.find_all {|r| r.project_id == project_id}.sort_by(&:created_at).reverse
end
|