Class Ruote::DollarSubstitution
In: lib/ruote/svc/dollar_sub.rb
Parent: Object

This service is in charge of extrapolating strings like "${f:nada} == ${f:y}".

It relies on the rufus-dollar gem.

It‘s OK to override this service with your own.

Methods

dict_class   literal_sub   new   s  

Public Class methods

Public Instance methods

This method is public, for easy overriding. This implementation returns Ruote::Dollar::Dict whose instances are used to extrapolate dollar strings like "${f:customer}" or "${r:Time.now.to_s}/${f:year_target}"

Performs ‘dollar substitution’ on a piece of text with as input a flow expression and a workitem (fields and variables).

With help from Nick Petrella (2008/03/20)

Protected Instance methods

If the final text is of the form "$f:x" or "$v:y" will lookup the x field or the y variable. If the lookup is successful (not nil) will return the value, not the text (the value.to_s).

[Validate]