Class: JSON::Schema::Reader
- Inherits:
-
Object
- Object
- JSON::Schema::Reader
- Defined in:
- lib/pdk/config/json_schema_namespace.rb
Instance Method Summary collapse
Instance Method Details
#original_read_file ⇒ Object
13 |
# File 'lib/pdk/config/json_schema_namespace.rb', line 13 alias original_read_file read_file |
#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 |