Class: OptParseValidator::ConfigFilesLoaderMerger::ConfigFile::JSON

Inherits:
Base
  • Object
show all
Defined in:
lib/opt_parse_validator/config_files_loader_merger/json.rb

Overview

Json Implementation

Instance Attribute Summary

Attributes inherited from Base

#path

Instance Method Summary collapse

Methods inherited from Base

#==, #initialize

Constructor Details

This class inherits a constructor from OptParseValidator::ConfigFilesLoaderMerger::ConfigFile::Base

Instance Method Details

#parseHash

Returns a { ‘key’ => value } hash.

Returns:

  • (Hash)

    a { ‘key’ => value } hash



11
12
13
# File 'lib/opt_parse_validator/config_files_loader_merger/json.rb', line 11

def parse
  ::JSON.parse(File.read(path))
end