Class: GitFame::FileUnit
- Inherits:
-
Struct
- Object
- Struct
- GitFame::FileUnit
- Defined in:
- lib/git_fame/file.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path
2 3 4 |
# File 'lib/git_fame/file.rb', line 2 def path @path end |
Instance Method Details
#extname ⇒ Object
3 4 5 6 7 |
# File 'lib/git_fame/file.rb', line 3 def extname return @_extname if @_extname @_extname = ::File.extname(path).sub(/^\./, "") @_extname = @_extname.empty? ? "unknown" : @_extname end |
#to_s ⇒ Object
9 10 11 |
# File 'lib/git_fame/file.rb', line 9 def to_s path end |