Class: Ubill::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
22
23
# File 'lib/ubill/configuration.rb', line 18

def initialize
  self.options = {
    page_size: "A4",
    margin: [2.8.cm, 2.8.cm, 3.2.cm, 2.8.cm]
  }
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



16
17
18
# File 'lib/ubill/configuration.rb', line 16

def options
  @options
end

Instance Method Details

#accountObject



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

def 
  @account ||= Account.new
end

#debug_bounding_boxesObject



41
42
43
# File 'lib/ubill/configuration.rb', line 41

def debug_bounding_boxes
  @debug_bounding_boxes = true
end

#debug_bounding_boxes?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/ubill/configuration.rb', line 45

def debug_bounding_boxes?
  @debug_bounding_boxes || false
end


29
30
31
# File 'lib/ubill/configuration.rb', line 29

def footer
  @footer ||= Footer.new
end

#headerObject



33
34
35
# File 'lib/ubill/configuration.rb', line 33

def header
  @header ||= Header.new
end

#page_size(value) ⇒ Object



25
26
27
# File 'lib/ubill/configuration.rb', line 25

def page_size(value)
  options[:page_size] = value
end