Class: Svg2pdf::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/svg2pdf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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

#debugObject

Returns the value of attribute debug.



37
38
39
# File 'lib/svg2pdf.rb', line 37

def debug
  @debug
end

#output_nameObject

Returns the value of attribute output_name.



37
38
39
# File 'lib/svg2pdf.rb', line 37

def output_name
  @output_name
end

#ratioObject

Returns the value of attribute ratio.



37
38
39
# File 'lib/svg2pdf.rb', line 37

def ratio
  @ratio
end

#use_temporary_dirObject

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_dirObject

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_hashObject



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