Sha256: ebd71fa4eed4d71b5c9a1ce7e4ecccd5a25176fdd5d29d700bc0c01303b76995
Contents?: true
Size: 597 Bytes
Versions: 21
Compression:
Stored size: 597 Bytes
Contents
class Tutorial::FileLoader attr_reader :root, :code_language, :doc_name, :format def initialize(root:, code_language:, doc_name:, format: 'yml') @root = root @code_language = code_language @doc_name = doc_name @format = format end def path @path ||= Nexmo::Markdown::DocFinder.find( root: root, document: doc_name, language: ::I18n.locale, code_language: code_language, format: format ).path end def content @content ||= File.read(path) end def yaml @yaml ||= YAML.safe_load(content) end end
Version data entries
21 entries across 21 versions & 1 rubygems