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



337
338
339
340
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 337

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

Instance Attribute Details

- (Object) lines (readonly)

Returns the value of attribute lines



335
336
337
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 335

def lines
  @lines
end

- (Object) revisions (readonly)

Returns the value of attribute revisions



335
336
337
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 335

def revisions
  @revisions
end

Instance Method Details

- (Object) add_line(line, revision)



342
343
344
345
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 342

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

- (Object) content



347
348
349
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 347

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

- (Boolean) empty?



351
352
353
# File 'lib/redmine/scm/adapters/abstract_adapter.rb', line 351

def empty?
  lines.empty?
end