Class: PhantomPDF::Config
- Inherits:
-
Object
- Object
- PhantomPDF::Config
- Defined in:
- lib/phantompdf/config.rb
Instance Attribute Summary collapse
-
#default_options ⇒ Object
Returns the value of attribute default_options.
-
#phantomjs ⇒ Object
readonly
Returns the value of attribute phantomjs.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(options = {}) ⇒ Config
Returns a new instance of Config.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/phantompdf/config.rb', line 6 def initialize(={}) @default_options = { :format => 'A4', :header => nil, :footer => nil, :margin => '1cm', :orientation => 'portrait', :zoom => 1, :cookies => {}, :timeout => 90000, :rendering_timeout => 1000 } @default_options.merge! || {} end |
Instance Attribute Details
#default_options ⇒ Object
Returns the value of attribute default_options.
3 4 5 |
# File 'lib/phantompdf/config.rb', line 3 def @default_options end |
#phantomjs ⇒ Object (readonly)
Returns the value of attribute phantomjs.
4 5 6 |
# File 'lib/phantompdf/config.rb', line 4 def phantomjs @phantomjs end |