Class: LittleGhost::Lookup::Root
- Inherits:
-
Data
- Object
- Data
- LittleGhost::Lookup::Root
- Defined in:
- lib/little_ghost/lookup.rb,
lib/little_ghost/lookup.rb
Overview
Holds an expanded lookup path and the optional trusted boundary it must remain within after symbolic links are resolved.
Instance Attribute Summary collapse
-
#boundary ⇒ Object
readonly
Returns the value of attribute boundary.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path:, boundary: nil) ⇒ Root
constructor
A new instance of Root.
Constructor Details
#initialize(path:, boundary: nil) ⇒ Root
Returns a new instance of Root.
9 10 11 12 13 14 |
# File 'lib/little_ghost/lookup.rb', line 9 def initialize(path:, boundary: nil) super( path: File.(path).freeze, boundary: boundary && File.(boundary).freeze ) end |
Instance Attribute Details
#boundary ⇒ Object (readonly)
Returns the value of attribute boundary
8 9 10 |
# File 'lib/little_ghost/lookup.rb', line 8 def boundary @boundary end |
#path ⇒ Object (readonly)
Returns the value of attribute path
8 9 10 |
# File 'lib/little_ghost/lookup.rb', line 8 def path @path end |