Class: Ubill::Configuration
- Inherits:
-
Object
- Object
- Ubill::Configuration
- Defined in:
- lib/ubill/configuration.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #account ⇒ Object
- #debug_bounding_boxes ⇒ Object
- #debug_bounding_boxes? ⇒ Boolean
- #footer ⇒ Object
- #header ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #page_size(value) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 22 23 |
# File 'lib/ubill/configuration.rb', line 18 def initialize self. = { page_size: "A4", margin: [2.8.cm, 2.8.cm, 3.2.cm, 2.8.cm] } end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
16 17 18 |
# File 'lib/ubill/configuration.rb', line 16 def @options end |
Instance Method Details
#account ⇒ Object
37 38 39 |
# File 'lib/ubill/configuration.rb', line 37 def account @account ||= Account.new end |
#debug_bounding_boxes ⇒ Object
41 42 43 |
# File 'lib/ubill/configuration.rb', line 41 def debug_bounding_boxes @debug_bounding_boxes = true end |
#debug_bounding_boxes? ⇒ Boolean
45 46 47 |
# File 'lib/ubill/configuration.rb', line 45 def debug_bounding_boxes? @debug_bounding_boxes || false end |
#footer ⇒ Object
29 30 31 |
# File 'lib/ubill/configuration.rb', line 29 def @footer ||= Footer.new end |
#header ⇒ Object
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) [:page_size] = value end |