Module: CommandKit::Env::Prefix
- Includes:
- CommandKit::Env
- Included in:
- Completion::Install
- Defined in:
- lib/command_kit/env/prefix.rb
Overview
Methods related to the PREFIX
environment variable.
Environment Variables
PREFIX
- The optional root prefix of the file-system.
Instance Attribute Summary collapse
-
#root ⇒ String
readonly
The root of the file-system.
Attributes included from CommandKit::Env
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Object
Initialize #root based on the
PREFIX
environment.
Instance Attribute Details
#root ⇒ String (readonly)
The root of the file-system.
24 25 26 |
# File 'lib/command_kit/env/prefix.rb', line 24 def root @root end |
Instance Method Details
#initialize(**kwargs) ⇒ Object
Initialize #root based on the PREFIX
environment
34 35 36 37 38 |
# File 'lib/command_kit/env/prefix.rb', line 34 def initialize(**kwargs) super(**kwargs) @root = env.fetch('PREFIX','/') end |