Sha256: ba8540fab191518fa3683c379bbb49d131cbd62835443828ce23d92fc66be3ff
Contents?: true
Size: 586 Bytes
Versions: 2
Compression:
Stored size: 586 Bytes
Contents
module Abrizer class AdaptationsFile include FilepathHelpers def initialize(filepath, output_directory) @filepath = filepath @output_directory = output_directory FileUtils.mkdir_p @output_directory unless File.exist? @output_directory end def adaptations adapt = Abrizer::AdaptationFinder.new(filepath: @filepath, output_directory: @output_directory).adaptations adapt_dump = adapt.map{|a| a.to_hash} File.open(adaptations_filepath, 'w') do |fh| fh.puts MultiJson.dump(adapt_dump) end adapt end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
abrizer-0.6.0 | lib/abrizer/adaptations_file.rb |
abrizer-0.5.0 | lib/abrizer/adaptations_file.rb |