Method: Env::EnvVar#replace
- Defined in:
- lib/GGEnv.rb
#replace(value) ⇒ Object
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/GGEnv.rb', line 137 def replace(value) if value.kind_of?(Array) super elsif value.kind_of?(String) super( value.split(SEP) ) elsif value.kind_of?(NilClass) clear; return self else raise Error, "Cannot assign #{value} to #{@name}. Not an array or string." end uniq! map! { |p| unify_path(p) } if Env.check_directories? check_directories else to_env end return self end |