Class: KrakendOpenAPI::JsonReader
- Inherits:
-
Object
- Object
- KrakendOpenAPI::JsonReader
- Defined in:
- lib/readers/json_reader.rb
Overview
Reads JSON files
Instance Method Summary collapse
-
#initialize(file_path) ⇒ JsonReader
constructor
A new instance of JsonReader.
- #read ⇒ Object
Constructor Details
#initialize(file_path) ⇒ JsonReader
Returns a new instance of JsonReader.
9 10 11 |
# File 'lib/readers/json_reader.rb', line 9 def initialize(file_path) @file_path = file_path end |
Instance Method Details
#read ⇒ Object
13 14 15 |
# File 'lib/readers/json_reader.rb', line 13 def read JSON.parse(KrakendOpenAPI::FileReader.new(@file_path).read) end |