Class: ZPdf::Base
- Inherits:
-
AbstractController::Base
- Object
- AbstractController::Base
- ZPdf::Base
- Includes:
- AbstractController::AssetPaths, AbstractController::Helpers, AbstractController::Logger, AbstractController::Rendering, AbstractController::Translation, ActionView::Layouts
- Defined in:
- lib/zpdf/base.rb
Class Attribute Summary collapse
- .generator_name ⇒ Object (also: controller_path)
Class Method Summary collapse
- .default(value = nil) ⇒ Object
- .default_pdf(value = nil) ⇒ Object
- .respond_to?(method, *args) ⇒ Boolean
Instance Method Summary collapse
- #generate(parameters = {}) ⇒ Object
-
#initialize(method_name, *args) ⇒ Base
constructor
A new instance of Base.
-
#process(*args) ⇒ Object
:nodoc:.
Constructor Details
#initialize(method_name, *args) ⇒ Base
Returns a new instance of Base.
88 89 90 91 |
# File 'lib/zpdf/base.rb', line 88 def initialize(method_name, *args) super() process(method_name, *args) end |
Class Attribute Details
.generator_name ⇒ Object Also known as: controller_path
54 55 56 |
# File 'lib/zpdf/base.rb', line 54 def generator_name @generator_name ||= name.underscore end |
Class Method Details
.default(value = nil) ⇒ Object
60 61 62 63 |
# File 'lib/zpdf/base.rb', line 60 def default(value = nil) self.default_params = default_params.merge(value).freeze if value default_params end |
.default_pdf(value = nil) ⇒ Object
65 66 67 68 |
# File 'lib/zpdf/base.rb', line 65 def default_pdf(value = nil) self.default_pdf_params = default_pdf_params.merge(value).freeze if value default_pdf_params end |
.respond_to?(method, *args) ⇒ Boolean
70 71 72 |
# File 'lib/zpdf/base.rb', line 70 def respond_to?(method, *args) super || action_methods.include?(method.to_s) end |
Instance Method Details
#generate(parameters = {}) ⇒ Object
98 99 100 |
# File 'lib/zpdf/base.rb', line 98 def generate(parameters={}) render_html(parameters) end |
#process(*args) ⇒ Object
:nodoc:
93 94 95 96 |
# File 'lib/zpdf/base.rb', line 93 def process(*args) #:nodoc: lookup_context.skip_default_locale! if lookup_context.respond_to?(:skip_default_locale!) super end |