diff options
Diffstat (limited to 'import/importer_base.rb')
-rw-r--r-- | import/importer_base.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/import/importer_base.rb b/import/importer_base.rb index a1ec42bb..64335ae7 100644 --- a/import/importer_base.rb +++ b/import/importer_base.rb @@ -17,6 +17,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +require 'json' require 'logger' require 'yaml' @@ -31,6 +32,11 @@ module Importer STDERR.puts(message) end + def write_lorry(file, lorry) + format_options = { :indent => ' ' } + file.puts(JSON.pretty_generate(lorry, format_options)) + end + def write_morph(file, morph) file.write(YAML.dump(morph)) end |