Class: Stowaway::FileObj
- Inherits:
-
Object
- Object
- Stowaway::FileObj
- Defined in:
- lib/stowaway/file.rb
Instance Attribute Summary collapse
-
#fullpath ⇒ Object
readonly
Returns the value of attribute fullpath.
Instance Method Summary collapse
- #==(fileObj) ⇒ Object
-
#initialize(fullpath, root = nil) ⇒ FileObj
constructor
A new instance of FileObj.
- #name ⇒ Object
- #path ⇒ Object
- #root_path ⇒ Object
Constructor Details
Instance Attribute Details
#fullpath ⇒ Object (readonly)
Returns the value of attribute fullpath.
3 4 5 |
# File 'lib/stowaway/file.rb', line 3 def fullpath @fullpath end |
Instance Method Details
#==(fileObj) ⇒ Object
23 24 25 |
# File 'lib/stowaway/file.rb', line 23 def ==(fileObj) self.fullpath == fileObj.fullpath end |
#name ⇒ Object
10 11 12 |
# File 'lib/stowaway/file.rb', line 10 def name File.basename(@fullpath) end |
#path ⇒ Object
14 15 16 |
# File 'lib/stowaway/file.rb', line 14 def path File.split(@fullpath)[0] end |