Class: Otto::Core::FileSafety::StaticFile

Inherits:
Struct
  • Object
show all
Defined in:
lib/otto/core/file_safety.rb

Overview

A validated static file: the canonical root, the canonical absolute path under it, and their relative difference. Returned as one value so callers never have to re-run realpath (one resolution per request).

Instance Attribute Summary collapse

Instance Attribute Details

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



37
38
39
# File 'lib/otto/core/file_safety.rb', line 37

def path
  @path
end

#relativeObject

Returns the value of attribute relative

Returns:

  • (Object)

    the current value of relative



37
38
39
# File 'lib/otto/core/file_safety.rb', line 37

def relative
  @relative
end

#rootObject

Returns the value of attribute root

Returns:

  • (Object)

    the current value of root



37
38
39
# File 'lib/otto/core/file_safety.rb', line 37

def root
  @root
end