Class: Svg2pdf::Config
- Inherits:
-
Object
- Object
- Svg2pdf::Config
- Defined in:
- lib/svg2pdf.rb
Instance Attribute Summary collapse
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#output_name ⇒ Object
Returns the value of attribute output_name.
-
#ratio ⇒ Object
Returns the value of attribute ratio.
-
#use_temporary_dir ⇒ Object
Returns the value of attribute use_temporary_dir.
-
#working_dir ⇒ Object
Returns the value of attribute working_dir.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
39 40 41 42 43 44 45 |
# File 'lib/svg2pdf.rb', line 39 def initialize @debug = false @output_name = "out" @ratio = 1.0 @use_temporary_dir = false @working_dir = "/tmp" end |
Instance Attribute Details
#debug ⇒ Object
Returns the value of attribute debug.
37 38 39 |
# File 'lib/svg2pdf.rb', line 37 def debug @debug end |
#output_name ⇒ Object
Returns the value of attribute output_name.
37 38 39 |
# File 'lib/svg2pdf.rb', line 37 def output_name @output_name end |
#ratio ⇒ Object
Returns the value of attribute ratio.
37 38 39 |
# File 'lib/svg2pdf.rb', line 37 def ratio @ratio end |
#use_temporary_dir ⇒ Object
Returns the value of attribute use_temporary_dir.
37 38 39 |
# File 'lib/svg2pdf.rb', line 37 def use_temporary_dir @use_temporary_dir end |
#working_dir ⇒ Object
Returns the value of attribute working_dir.
37 38 39 |
# File 'lib/svg2pdf.rb', line 37 def working_dir @working_dir end |
Instance Method Details
#to_hash ⇒ Object
47 48 49 |
# File 'lib/svg2pdf.rb', line 47 def to_hash Hash[instance_variables.map { |var| [var[1..-1].to_sym, instance_variable_get(var)] }] end |