Class: LittleGhost::Lookup::Root

Inherits:
Data
  • Object
show all
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

Instance Method Summary collapse

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.expand_path(path).freeze,
    boundary: boundary && File.expand_path(boundary).freeze
  )
end

Instance Attribute Details

#boundaryObject (readonly)

Returns the value of attribute boundary

Returns:

  • (Object)

    the current value of boundary



8
9
10
# File 'lib/little_ghost/lookup.rb', line 8

def boundary
  @boundary
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



8
9
10
# File 'lib/little_ghost/lookup.rb', line 8

def path
  @path
end