Class: Snippr::Processor::Functions
- Inherits:
-
Object
- Object
- Snippr::Processor::Functions
- Defined in:
- lib/snippr/processor/functions.rb
Instance Method Summary collapse
Instance Method Details
#process(content, opts = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/snippr/processor/functions.rb', line 11 def process(content, opts = {}) content.scan(/\{(.*?):(.*?)\}/) do |match| command, = match = opts.merge(hashify()) command = "cmd_#{command}" content = send(command, content, , ) if respond_to?(command, true) end content end |