Class: SDL::Exporters::Exporter
- Inherits:
-
Object
- Object
- SDL::Exporters::Exporter
- Defined in:
- lib/sdl/exporters/exporter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#compendium ⇒ Object
readonly
Returns the value of attribute compendium.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #export_to_file(path, content) ⇒ Object
-
#initialize(compendium, options = {}) ⇒ Exporter
constructor
A new instance of Exporter.
Constructor Details
#initialize(compendium, options = {}) ⇒ Exporter
Returns a new instance of Exporter.
5 6 7 8 |
# File 'lib/sdl/exporters/exporter.rb', line 5 def initialize(compendium, = {}) @compendium = compendium @options = end |
Instance Attribute Details
#compendium ⇒ Object (readonly)
Returns the value of attribute compendium.
2 3 4 |
# File 'lib/sdl/exporters/exporter.rb', line 2 def compendium @compendium end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/sdl/exporters/exporter.rb', line 3 def @options end |
Instance Method Details
#export_to_file(path, content) ⇒ Object
10 11 12 13 14 |
# File 'lib/sdl/exporters/exporter.rb', line 10 def export_to_file(path, content) File.open(path, 'w') do |f| f.write(content) end end |