lib/gloo/expr/l_string.rb in gloo-0.6.1 vs lib/gloo/expr/l_string.rb in gloo-0.7.0

- old
+ new

@@ -6,20 +6,24 @@ module Gloo module Expr class LString < Gloo::Core::Literal + # # Set the value, triming opening and closing # quotations if necessary. + # def set_value( value ) @value = value return unless value @value = LString.strip_quotes( @value ) end + # # Is the given token a string? + # def self.string?( token ) return false unless token.is_a? String return true if token.start_with?( '"' ) return true if token.start_with?( "'" ) @@ -40,9 +44,12 @@ str = str[ 0..-2 ] if str.end_with?( "'" ) return str end end + # + # Get string representation + # def to_s return self.value end end