Class: XDry::FileRef
- Inherits:
-
BaseFileRef
- Object
- BaseFileRef
- XDry::FileRef
- Defined in:
- lib/xdry/parsing/pos.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from BaseFileRef
Instance Method Summary collapse
-
#initialize(path) ⇒ FileRef
constructor
A new instance of FileRef.
- #read ⇒ Object
Methods inherited from BaseFileRef
Constructor Details
#initialize(path) ⇒ FileRef
Returns a new instance of FileRef.
26 27 28 29 |
# File 'lib/xdry/parsing/pos.rb', line 26 def initialize path super() @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
24 25 26 |
# File 'lib/xdry/parsing/pos.rb', line 24 def path @path end |
Instance Method Details
#read ⇒ Object
31 32 33 |
# File 'lib/xdry/parsing/pos.rb', line 31 def read open(@path) { |f| f.read } end |