Class: SDL::Exporters::Exporter

Inherits:
Object
  • Object
show all
Defined in:
lib/sdl/exporters/exporter.rb

Direct Known Subclasses

SchemaExporter, ServiceExporter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Exporter

Returns a new instance of Exporter.



4
5
6
# File 'lib/sdl/exporters/exporter.rb', line 4

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



2
3
4
# File 'lib/sdl/exporters/exporter.rb', line 2

def options
  @options
end

Instance Method Details

#export_to_file(path, content) ⇒ Object



8
9
10
11
12
# File 'lib/sdl/exporters/exporter.rb', line 8

def export_to_file(path, content)
  File.open(path, 'w') do |f|
    f.write(content)
  end
end