Class: KrakendOpenAPI::YamlReader

Inherits:
Object
  • Object
show all
Defined in:
lib/readers/yaml_reader.rb

Overview

Reads YAML files

Instance Method Summary collapse

Constructor Details

#initialize(file_path) ⇒ YamlReader

Returns a new instance of YamlReader.



8
9
10
# File 'lib/readers/yaml_reader.rb', line 8

def initialize(file_path)
  @file_path = file_path
end

Instance Method Details

#readObject



12
13
14
# File 'lib/readers/yaml_reader.rb', line 12

def read
  YAML.safe_load(File.read("#{Dir.pwd}/#{@file_path}"))
end