diff options
Diffstat (limited to 'app/models/chouette/exporter.rb')
| -rw-r--r-- | app/models/chouette/exporter.rb | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/app/models/chouette/exporter.rb b/app/models/chouette/exporter.rb index df85a9dde..98cab7269 100644 --- a/app/models/chouette/exporter.rb +++ b/app/models/chouette/exporter.rb @@ -1,32 +1,34 @@ -class Chouette::Exporter +module Chouette + class Exporter - attr_reader :schema + attr_reader :schema - def initialize(schema) - @schema = schema - end + def initialize(schema) + @schema = schema + end - def chouette_command - @chouette_command ||= Chouette::Command.new(:schema => schema) - end + def chouette_command + @chouette_command ||= Chouette::Command.new(:schema => schema) + end - def export(file, options = {}) - options = { - :format => :neptune - }.merge(options) - - command_options = { - :c => "export", - :o => "line", - :format => options.delete(:format).to_s.upcase, - :output_file => File.expand_path(file), - :optimize_memory => true - }.merge(options) - - logger.info "Export #{file} in schema #{schema}" - chouette_command.run! command_options - end + def export(file, options = {}) + options = { + :format => :neptune + }.merge(options) - include Chouette::CommandLineSupport + command_options = { + :c => "export", + :o => "line", + :format => options.delete(:format).to_s.upcase, + :output_file => File.expand_path(file), + :optimize_memory => true + }.merge(options) -end + logger.info "Export #{file} in schema #{schema}" + chouette_command.run! command_options + end + + include Chouette::CommandLineSupport + + end +end
\ No newline at end of file |
