Class: Magnifier::Exporter
- Inherits:
-
Object
- Object
- Magnifier::Exporter
- Defined in:
- lib/magnifier/exporter.rb
Instance Attribute Summary collapse
-
#magnifier_object ⇒ Object
readonly
Returns the value of attribute magnifier_object.
-
#path_object ⇒ Object
readonly
Returns the value of attribute path_object.
Class Method Summary collapse
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(path_object, magnifier_object) ⇒ Exporter
constructor
A new instance of Exporter.
Constructor Details
#initialize(path_object, magnifier_object) ⇒ Exporter
Returns a new instance of Exporter.
11 12 13 14 |
# File 'lib/magnifier/exporter.rb', line 11 def initialize(path_object, magnifier_object) @path_object = path_object @magnifier_object = magnifier_object end |
Instance Attribute Details
#magnifier_object ⇒ Object (readonly)
Returns the value of attribute magnifier_object.
5 6 7 |
# File 'lib/magnifier/exporter.rb', line 5 def magnifier_object @magnifier_object end |
#path_object ⇒ Object (readonly)
Returns the value of attribute path_object.
5 6 7 |
# File 'lib/magnifier/exporter.rb', line 5 def path_object @path_object end |
Class Method Details
.export(path_object, magnifier_object) ⇒ Object
7 8 9 |
# File 'lib/magnifier/exporter.rb', line 7 def self.export(path_object, magnifier_object) new(path_object, magnifier_object).export end |
Instance Method Details
#export ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/magnifier/exporter.rb', line 16 def export file = File.open(@path_object, 'w') file.write(compose_yaml) file.close file end |