Method: Fig::Statement::Retrieve#initialize
- Defined in:
- lib/fig/statement/retrieve.rb
#initialize(line_column, source_description, variable, tokenized_path) ⇒ Retrieve
Returns a new instance of Retrieve.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/fig/statement/retrieve.rb', line 20 def initialize(line_column, source_description, variable, tokenized_path) super(line_column, source_description) @variable = variable @tokenized_path = tokenized_path path = tokenized_path.to_escaped_string # Yeah, it's not cross-platform, but File doesn't have an #absolute? method # and this is better than nothing. if ( path =~ %r< ^ [\\/] >x \ || Fig::OperatingSystem.windows? && path =~ %r< ^ [a-z] : >xi ) Fig::Logging.warn( %Q<The retrieve path "#{path}"#{position_string()} looks like it is intended to be absolute; retrieve paths are always treated as relative.> ) end end |