Class: Yorinter::PrintableDocument
- Inherits:
-
Object
- Object
- Yorinter::PrintableDocument
- Includes:
- Printable
- Defined in:
- lib/yorinter/printable_document.rb
Instance Attribute Summary collapse
-
#binding_object ⇒ Object
Returns the value of attribute binding_object.
-
#code ⇒ Object
Returns the value of attribute code.
-
#helper ⇒ Object
Returns the value of attribute helper.
-
#input_format ⇒ Object
Returns the value of attribute input_format.
-
#model ⇒ Object
Returns the value of attribute model.
-
#model_endpoint ⇒ Object
Returns the value of attribute model_endpoint.
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
-
#output_format ⇒ Object
Returns the value of attribute output_format.
-
#style ⇒ Object
Returns the value of attribute style.
-
#template ⇒ Object
Returns the value of attribute template.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ PrintableDocument
constructor
A new instance of PrintableDocument.
- #render(engine, params = {}, options = {}) ⇒ Object
Methods included from Printable
Constructor Details
#initialize(params = {}) ⇒ PrintableDocument
Returns a new instance of PrintableDocument.
5 6 7 8 9 10 11 |
# File 'lib/yorinter/printable_document.rb', line 5 def initialize params = {} [:name, :code, :version, :template, :helper, :style, :model, :model_endpoint, :binding_object, :input_format, :output_format, :options].each do |field| send("#{field}=".to_sym, params[field]) if params[field] end end |
Instance Attribute Details
#binding_object ⇒ Object
Returns the value of attribute binding_object.
28 29 30 |
# File 'lib/yorinter/printable_document.rb', line 28 def binding_object @binding_object end |
#code ⇒ Object
Returns the value of attribute code.
18 19 20 |
# File 'lib/yorinter/printable_document.rb', line 18 def code @code end |
#helper ⇒ Object
Returns the value of attribute helper.
21 22 23 |
# File 'lib/yorinter/printable_document.rb', line 21 def helper @helper end |
#input_format ⇒ Object
Returns the value of attribute input_format.
25 26 27 |
# File 'lib/yorinter/printable_document.rb', line 25 def input_format @input_format end |
#model ⇒ Object
Returns the value of attribute model.
23 24 25 |
# File 'lib/yorinter/printable_document.rb', line 23 def model @model end |
#model_endpoint ⇒ Object
Returns the value of attribute model_endpoint.
24 25 26 |
# File 'lib/yorinter/printable_document.rb', line 24 def model_endpoint @model_endpoint end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'lib/yorinter/printable_document.rb', line 17 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
27 28 29 |
# File 'lib/yorinter/printable_document.rb', line 27 def end |
#output_format ⇒ Object
Returns the value of attribute output_format.
26 27 28 |
# File 'lib/yorinter/printable_document.rb', line 26 def output_format @output_format end |
#style ⇒ Object
Returns the value of attribute style.
22 23 24 |
# File 'lib/yorinter/printable_document.rb', line 22 def style @style end |
#template ⇒ Object
Returns the value of attribute template.
20 21 22 |
# File 'lib/yorinter/printable_document.rb', line 20 def template @template end |
#version ⇒ Object
Returns the value of attribute version.
19 20 21 |
# File 'lib/yorinter/printable_document.rb', line 19 def version @version end |
Instance Method Details
#render(engine, params = {}, options = {}) ⇒ Object
13 14 15 |
# File 'lib/yorinter/printable_document.rb', line 13 def render engine, params = {}, = {} engine.new(self, params, ).render end |