Class: PdfTemplator::Type
- Inherits:
-
Object
- Object
- PdfTemplator::Type
- Defined in:
- lib/pdf_templator/type.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
-
#call(_value) ⇒ Object
This method is called immediately when a type is found.
-
#initialize(content, args = {}) ⇒ Type
constructor
A new instance of Type.
Constructor Details
#initialize(content, args = {}) ⇒ Type
Returns a new instance of Type.
8 9 10 11 |
# File 'lib/pdf_templator/type.rb', line 8 def initialize(content, args = {}) @content = content @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
6 7 8 |
# File 'lib/pdf_templator/type.rb', line 6 def args @args end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
5 6 7 |
# File 'lib/pdf_templator/type.rb', line 5 def content @content end |
Instance Method Details
#call(_value) ⇒ Object
This method is called immediately when a type is found. Override it in sub-classes.
15 16 17 18 |
# File 'lib/pdf_templator/type.rb', line 15 def call(_value) fail NotImplementedError, "you must override the `call' method for option #{self.class}" end |