Class: SourceFile
- Inherits:
-
Object
- Object
- SourceFile
- Defined in:
- lib/rakepp/sourcefile.rb
Instance Attribute Summary collapse
-
#fileName ⇒ Object
readonly
Returns the value of attribute fileName.
-
#fullPath ⇒ Object
readonly
Returns the value of attribute fullPath.
Instance Method Summary collapse
-
#initialize(fullPath, fileName) ⇒ SourceFile
constructor
A new instance of SourceFile.
- #to_o ⇒ Object
- #to_s ⇒ Object
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
#fileName ⇒ Object (readonly)
Returns the value of attribute fileName.
2 3 4 |
# File 'lib/rakepp/sourcefile.rb', line 2 def fileName @fileName end |
#fullPath ⇒ Object (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_o ⇒ Object
8 9 10 |
# File 'lib/rakepp/sourcefile.rb', line 8 def to_o return fileName.sub(/\.[^.]+$/, '.o') end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/rakepp/sourcefile.rb', line 12 def to_s return "SourceFile #{fullPath}" end |