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

- (Annotate) initialize

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

- (Object) lines (readonly)

Returns the value of attribute lines



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

def lines
  @lines
end

- (Object) revisions (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

- (Object) add_line(line, revision)



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

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

- (Object) content



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

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

- (Boolean) empty?

Returns:

  • (Boolean)


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

def empty?
  lines.empty?
end