Class: SourceFile

Inherits:
Object
  • Object
show all
Defined in:
lib/rakepp/sourcefile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fullPath, fileName) ⇒ SourceFile

Returns a new instance of SourceFile.



3
4
5
6
# File 'lib/rakepp/sourcefile.rb', line 3

def initialize(fullPath, fileName)
  @fullPath = fullPath
  @fileName = fileName
end

Instance Attribute Details

#fileNameObject (readonly)

Returns the value of attribute fileName.



2
3
4
# File 'lib/rakepp/sourcefile.rb', line 2

def fileName
  @fileName
end

#fullPathObject (readonly)

Returns the value of attribute fullPath.



2
3
4
# File 'lib/rakepp/sourcefile.rb', line 2

def fullPath
  @fullPath
end

Instance Method Details

#to_oObject



8
9
10
# File 'lib/rakepp/sourcefile.rb', line 8

def to_o
  return fileName.sub(/\.[^.]+$/, '.o')
end

#to_sObject



12
13
14
# File 'lib/rakepp/sourcefile.rb', line 12

def to_s
  return "SourceFile #{fullPath}"
end