Class: Redmine::Scm::Adapters::Annotate
- Inherits:
-
Object
- Object
- Redmine::Scm::Adapters::Annotate
- Defined in:
- lib/redmine/scm/adapters/abstract_adapter.rb
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#previous_annotations ⇒ Object
readonly
Returns the value of attribute previous_annotations.
-
#revisions ⇒ Object
readonly
Returns the value of attribute revisions.
Instance Method Summary collapse
- #add_line(line, revision, previous = nil) ⇒ Object
- #content ⇒ Object
- #empty? ⇒ Boolean
-
#initialize ⇒ Annotate
constructor
A new instance of Annotate.
Constructor Details
#initialize ⇒ Annotate
Returns a new instance of Annotate.
416 417 418 419 420 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 416 def initialize @lines = [] @revisions = [] @previous_annotations = [] end |
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
414 415 416 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 414 def lines @lines end |
#previous_annotations ⇒ Object (readonly)
Returns the value of attribute previous_annotations.
414 415 416 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 414 def previous_annotations @previous_annotations end |
#revisions ⇒ Object (readonly)
Returns the value of attribute revisions.
414 415 416 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 414 def revisions @revisions end |
Instance Method Details
#add_line(line, revision, previous = nil) ⇒ Object
422 423 424 425 426 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 422 def add_line(line, revision, previous=nil) @lines << line @revisions << revision @previous_annotations << previous end |
#content ⇒ Object
428 429 430 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 428 def content content = lines.join("\n") end |
#empty? ⇒ Boolean
432 433 434 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 432 def empty? lines.empty? end |