Class: MetaCommit::Models::Changes::Repository
- Inherits:
-
Object
- Object
- MetaCommit::Models::Changes::Repository
- Defined in:
- lib/meta_commit/models/changes/repository.rb
Overview
Collection of commit changes
Instance Attribute Summary collapse
-
#commit_changes ⇒ Array<MetaCommit::Models::Commit>
The current value of commit_changes.
-
#repo_id ⇒ String
The current value of repo_id.
Instance Method Summary collapse
- #each { ... } ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(repo_id) ⇒ Repository
constructor
A new instance of Repository.
- #push(commit_change) ⇒ Object
Constructor Details
#initialize(repo_id) ⇒ Repository
Returns a new instance of Repository.
9 10 11 12 |
# File 'lib/meta_commit/models/changes/repository.rb', line 9 def initialize(repo_id) @repo_id = repo_id @commit_changes = [] end |
Instance Attribute Details
#commit_changes ⇒ Array<MetaCommit::Models::Commit>
Returns the current value of commit_changes.
5 6 7 |
# File 'lib/meta_commit/models/changes/repository.rb', line 5 def commit_changes @commit_changes end |
#repo_id ⇒ String
Returns the current value of repo_id.
5 6 7 |
# File 'lib/meta_commit/models/changes/repository.rb', line 5 def repo_id @repo_id end |
Instance Method Details
#each { ... } ⇒ Object
21 22 23 |
# File 'lib/meta_commit/models/changes/repository.rb', line 21 def each(&block) @commit_changes.each(&block) end |
#empty? ⇒ Boolean
26 27 28 |
# File 'lib/meta_commit/models/changes/repository.rb', line 26 def empty? @commit_changes.empty? end |
#push(commit_change) ⇒ Object
16 17 18 |
# File 'lib/meta_commit/models/changes/repository.rb', line 16 def push(commit_change) @commit_changes.push(commit_change) end |