Module: GreenGarden::Loader
- Included in:
- Tree
- Defined in:
- lib/green_garden/loader.rb
Instance Method Summary collapse
Instance Method Details
#load_json(file_path, read_mode = 'r') ⇒ Object
9 10 11 |
# File 'lib/green_garden/loader.rb', line 9 def load_json(file_path, read_mode = 'r') File.open(file_path, read_mode) { |f| Oj.load(f.read) } end |