Class: Grit::Grep

Inherits:
Object
  • Object
show all
Defined in:
lib/grit/grep.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repo, filename, startline, content, is_binary) ⇒ Grep

Returns a new instance of Grep.



11
12
13
14
15
16
17
# File 'lib/grit/grep.rb', line 11

def initialize(repo, filename, startline, content, is_binary)
  @repo   = repo
  @filename = filename
  @startline = startline.to_i
  @content = content
  @is_binary = is_binary
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



8
9
10
# File 'lib/grit/grep.rb', line 8

def content
  @content
end

#filenameObject (readonly)

Returns the value of attribute filename.



6
7
8
# File 'lib/grit/grep.rb', line 6

def filename
  @filename
end

#is_binaryObject (readonly)

Returns the value of attribute is_binary.



9
10
11
# File 'lib/grit/grep.rb', line 9

def is_binary
  @is_binary
end

#repoObject (readonly)

Returns the value of attribute repo.



5
6
7
# File 'lib/grit/grep.rb', line 5

def repo
  @repo
end

#startlineObject (readonly)

Returns the value of attribute startline.



7
8
9
# File 'lib/grit/grep.rb', line 7

def startline
  @startline
end