Class: Clook::Json
- Inherits:
-
Object
- Object
- Clook::Json
- Defined in:
- lib/clook/json.rb
Class Method Summary collapse
Class Method Details
.fetch(value) ⇒ Object
10 11 12 13 14 |
# File 'lib/clook/json.rb', line 10 def fetch value file = File.read(@path) data = JSON.parse(file) data[value] end |
.initialize(path) ⇒ Object
6 7 8 |
# File 'lib/clook/json.rb', line 6 def initialize path @path = path end |