Class: Bidi2pdfRails::Services::HtmlOptions
- Inherits:
-
Object
- Object
- Bidi2pdfRails::Services::HtmlOptions
- Defined in:
- lib/bidi2pdf_rails/services/html_options.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
-
#html_options ⇒ Object
readonly
Returns the value of attribute html_options.
-
#pdf_options ⇒ Object
readonly
Returns the value of attribute pdf_options.
Instance Method Summary collapse
- #asset_host ⇒ Object
- #html ⇒ Object
-
#initialize(html_options, pdf_options, controller) ⇒ HtmlOptions
constructor
A new instance of HtmlOptions.
Constructor Details
#initialize(html_options, pdf_options, controller) ⇒ HtmlOptions
Returns a new instance of HtmlOptions.
8 9 10 11 12 |
# File 'lib/bidi2pdf_rails/services/html_options.rb', line 8 def initialize(, , controller) @html_options = @pdf_options = @controller = controller end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
6 7 8 |
# File 'lib/bidi2pdf_rails/services/html_options.rb', line 6 def controller @controller end |
#html_options ⇒ Object (readonly)
Returns the value of attribute html_options.
6 7 8 |
# File 'lib/bidi2pdf_rails/services/html_options.rb', line 6 def @html_options end |
#pdf_options ⇒ Object (readonly)
Returns the value of attribute pdf_options.
6 7 8 |
# File 'lib/bidi2pdf_rails/services/html_options.rb', line 6 def @pdf_options end |
Instance Method Details
#asset_host ⇒ Object
14 15 16 |
# File 'lib/bidi2pdf_rails/services/html_options.rb', line 14 def asset_host .fetch(:asset_host) { |_key| .asset_host } end |
#html ⇒ Object
18 19 20 |
# File 'lib/bidi2pdf_rails/services/html_options.rb', line 18 def html .fetch(:inline) { |_key| HtmlRenderer.new(controller, .merge({ asset_host: asset_host })).render } end |