Class: ConfigType::Json
- Inherits:
-
Object
- Object
- ConfigType::Json
- Defined in:
- lib/config_file/config_type.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extensions ⇒ Object
37 38 39 |
# File 'lib/config_file/config_type.rb', line 37 def self.extensions [".json"] end |
Instance Method Details
#read(file_name) ⇒ Object
41 42 43 44 45 |
# File 'lib/config_file/config_type.rb', line 41 def read file_name content = File.open(file_name).read ::JSON.parse(content) end |