Method: JSON::Schema::Reader#read_file
- Defined in:
- lib/pdk/config/json_schema_namespace.rb
#read_file(pathname) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/pdk/config/json_schema_namespace.rb', line 15 def read_file(pathname) new_pathname = JSON::Util::URI.unescaped_path(pathname.to_s) # Munge the path if it looks like a Windows path e.g. /C:/Windows ... # Note that UNC style paths do not have the same issue (\\host\path) new_pathname.slice!(0) if new_pathname.start_with?('/') && new_pathname[2] == ':' original_read_file(Pathname.new(new_pathname)) end |