Sha256: 216d9e8e5475a3e10be06ce680e133eaa6d0a5d88018f0d7b73e5af707cb88a9
Contents?: true
Size: 454 Bytes
Versions: 2
Compression:
Stored size: 454 Bytes
Contents
# coding: utf-8 require 'yaml' module ActiveExport class Yaml < ::ActiveExport::Base # @return [String] YAML style string # @memo output format(i want) # - # - label: value # - label: value def export(data) [].tap {|o| export_data(data, o) }.to_yaml end def export_file(data, filename) File.atomic_write(filename.to_s) do |file| file.write export(data) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_export-0.4.0 | lib/active_export/yaml.rb |
active_export-0.3.0 | lib/active_export/yaml.rb |