Class: ReeText::SafeJoin
- Inherits:
-
Object
- Object
- ReeText::SafeJoin
- Includes:
- Ree::FnDSL
- Defined in:
- lib/ree_lib/packages/ree_text/package/ree_text/functions/safe_join.rb
Constant Summary collapse
- DEFAULTS =
{ sep: "$" }
Instance Method Summary collapse
Instance Method Details
#call(array, **opts) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/ree_lib/packages/ree_text/package/ree_text/functions/safe_join.rb', line 30 def call(array, **opts) = DEFAULTS.merge(opts) sep = escape_html([:sep]) array.flatten.map { |i| escape_html(i) }.join(sep) end |