Class: Redmine::Scm::Adapters::Annotate
- Inherits:
-
Object
- Object
- Redmine::Scm::Adapters::Annotate
- Defined in:
- lib/redmine/scm/adapters/abstract_adapter.rb
Overview
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#revisions ⇒ Object
readonly
Returns the value of attribute revisions.
Instance Method Summary collapse
- #add_line(line, revision) ⇒ Object
- #content ⇒ Object
- #empty? ⇒ Boolean
-
#initialize ⇒ Annotate
constructor
A new instance of Annotate.
Constructor Details
#initialize ⇒ Annotate
Returns a new instance of Annotate
403 404 405 406 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 403 def initialize @lines = [] @revisions = [] end |
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines
401 402 403 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 401 def lines @lines end |
#revisions ⇒ Object (readonly)
Returns the value of attribute revisions
401 402 403 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 401 def revisions @revisions end |
Instance Method Details
#add_line(line, revision) ⇒ Object
408 409 410 411 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 408 def add_line(line, revision) @lines << line @revisions << revision end |
#content ⇒ Object
413 414 415 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 413 def content content = lines.join("\n") end |
#empty? ⇒ Boolean
417 418 419 |
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 417 def empty? lines.empty? end |