Class: Cmds::ShellEruby

Inherits:
Erubis::EscapedEruby
  • Object
show all
Defined in:
lib/cmds/shell_eruby.rb

Overview

extension of Erubis’ EscapedEruby (which auto-escapes ‘<%= %>` and leaves `<%== %>` raw) that calls `Cmds.expand_sub` on the value

Instance Method Summary collapse

Instance Method Details

#escaped_expr(code) ⇒ Object



7
8
9
# File 'lib/cmds/shell_eruby.rb', line 7

def escaped_expr code
  "::Cmds.expand_sub(#{code.strip})"
end