Class: Far::File

Inherits:
Object
  • Object
show all
Defined in:
lib/far/file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, find) ⇒ File

Returns a new instance of File.



5
6
7
8
# File 'lib/far/file.rb', line 5

def initialize(name, find)
  @name  = name
  @parts ||= `ack #{find} #{name} /dev/null`.split("\n")
end

Instance Attribute Details

#changed_versionObject

Returns the value of attribute changed_version.



3
4
5
# File 'lib/far/file.rb', line 3

def changed_version
  @changed_version
end

#changesObject

Returns the value of attribute changes.



3
4
5
# File 'lib/far/file.rb', line 3

def changes
  @changes
end

#colorized_nameObject

Returns the value of attribute colorized_name.



3
4
5
# File 'lib/far/file.rb', line 3

def colorized_name
  @colorized_name
end

#findObject

Returns the value of attribute find.



3
4
5
# File 'lib/far/file.rb', line 3

def find
  @find
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/far/file.rb', line 3

def name
  @name
end

#original_versionObject

Returns the value of attribute original_version.



3
4
5
# File 'lib/far/file.rb', line 3

def original_version
  @original_version
end

#parts=(value) ⇒ Object

Sets the attribute parts

Parameters:

  • value

    the value to set the attribute parts to.



3
4
5
# File 'lib/far/file.rb', line 3

def parts=(value)
  @parts = value
end