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