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

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

Overview

Since:

  • 0.6.1

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAnnotate

Returns a new instance of Annotate



411
412
413
414
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 411

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

Instance Attribute Details

#linesObject (readonly)

Returns the value of attribute lines



409
410
411
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 409

def lines
  @lines
end

#revisionsObject (readonly)

Returns the value of attribute revisions



409
410
411
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 409

def revisions
  @revisions
end

Instance Method Details

#add_line(line, revision) ⇒ Object



416
417
418
419
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 416

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

#contentObject



421
422
423
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 421

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

#empty?Boolean

Returns:

  • (Boolean)


425
426
427
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 425

def empty?
  lines.empty?
end