Class: AndParcel::FileRef
- Inherits:
-
Object
- Object
- AndParcel::FileRef
- Defined in:
- lib/andparcel/fileref.rb
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#local ⇒ Object
readonly
Returns the value of attribute local.
-
#relative ⇒ Object
readonly
Returns the value of attribute relative.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, dir = nil) ⇒ FileRef
constructor
A new instance of FileRef.
Constructor Details
#initialize(name, dir = nil) ⇒ FileRef
Returns a new instance of FileRef.
15 16 17 18 19 20 |
# File 'lib/andparcel/fileref.rb', line 15 def initialize(name, dir=nil) @local=name @dir=dir @relative=@local[dir.size, 10000] if @local[0, dir.size]==dir @relative=@local if !@relative end |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
3 4 5 |
# File 'lib/andparcel/fileref.rb', line 3 def dir @dir end |
#local ⇒ Object (readonly)
Returns the value of attribute local.
3 4 5 |
# File 'lib/andparcel/fileref.rb', line 3 def local @local end |
#relative ⇒ Object (readonly)
Returns the value of attribute relative.
3 4 5 |
# File 'lib/andparcel/fileref.rb', line 3 def relative @relative end |