Class: Redmine::Scm::Adapters::Annotate

Inherits:
Object
  • Object
show all
Defined in:
lib/redmine/scm/adapters/abstract_adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAnnotate

Returns a new instance of Annotate



280
281
282
283
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 280

def initialize
  @lines = []
  @revisions = []
end

Instance Attribute Details

#linesObject (readonly)

Returns the value of attribute lines



278
279
280
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 278

def lines
  @lines
end

#revisionsObject (readonly)

Returns the value of attribute revisions



278
279
280
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 278

def revisions
  @revisions
end

Instance Method Details

#add_line(line, revision) ⇒ Object



285
286
287
288
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 285

def add_line(line, revision)
  @lines << line
  @revisions << revision
end

#contentObject



290
291
292
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 290

def content
  content = lines.join("\n")
end

#empty?Boolean

Returns:

  • (Boolean)


294
295
296
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 294

def empty?
  lines.empty?
end