Class: SimpleHdGraph::Reader
- Inherits:
-
Object
- Object
- SimpleHdGraph::Reader
- Defined in:
- lib/simple-hd-graph/reader.rb
Instance Method Summary collapse
- #read_dir(dir) ⇒ String
-
#read_file(file) ⇒ String
:reek:UtilityFunction.
Instance Method Details
#read_dir(dir) ⇒ String
16 17 18 19 20 |
# File 'lib/simple-hd-graph/reader.rb', line 16 def read_dir(dir) Dir.glob("#{dir}/**/*.{yml,yaml}").map {|file| read_file(file) }.join("---\n") end |
#read_file(file) ⇒ String
:reek:UtilityFunction
8 9 10 |
# File 'lib/simple-hd-graph/reader.rb', line 8 def read_file(file) File.read(file) end |