Method: Dentaku::AST::StringFunctions::Left#value

Defined in:
lib/dentaku/ast/functions/string_functions.rb

#value(context = {}) ⇒ Object



12
13
14
15
16
# File 'lib/dentaku/ast/functions/string_functions.rb', line 12

def value(context={})
  string = @string.value(context).to_s
  length = @length.value(context)
  string[0, length]
end