Class: Markabb::Callback
- Inherits:
-
Object
- Object
- Markabb::Callback
- Defined in:
- lib/markabb/classes/callback.rb
Overview
Class for callbacks, all callbacks should be an instance of this.
Instance Method Summary collapse
-
#initialize(proc) ⇒ Callback
constructor
A new instance of Callback.
-
#run(ar) ⇒ Object
Passes all the options found in the gsub from the tag (see Markabb::Tag) to the Proc.
Constructor Details
#initialize(proc) ⇒ Callback
Returns a new instance of Callback.
4 5 6 |
# File 'lib/markabb/classes/callback.rb', line 4 def initialize(proc) @proc = proc end |
Instance Method Details
#run(ar) ⇒ Object
Passes all the options found in the gsub from the tag (see Markabb::Tag) to the Proc
9 10 11 |
# File 'lib/markabb/classes/callback.rb', line 9 def run(ar) @proc.call *ar end |