Class: Transfigr::Formatter
- Inherits:
-
Object
- Object
- Transfigr::Formatter
- Defined in:
- lib/transfigr/abstract_formatter.rb
Overview
Transfigr::Formatter is the base class to inherit from when developing your own formatters
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
Class Method Summary collapse
-
.after_activation(&block) ⇒ Object
The after_activation block allows you to call code after the formatter has been activated.
Instance Method Summary collapse
-
#initialize(target) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(target) ⇒ Formatter
Returns a new instance of Formatter.
6 7 8 |
# File 'lib/transfigr/abstract_formatter.rb', line 6 def initialize(target) @target = target end |
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
4 5 6 |
# File 'lib/transfigr/abstract_formatter.rb', line 4 def target @target end |
Class Method Details
.after_activation(&block) ⇒ Object
22 23 24 25 |
# File 'lib/transfigr/abstract_formatter.rb', line 22 def self.after_activation(&block) @after_activation = block if block_given? @after_activation end |