class DDQL::TokenType::String
Public Class Methods
new()
click to toggle source
Calls superclass method
DDQL::TokenType::Literal::new
# File lib/ddql/token_type.rb, line 190 def initialize super(name: :string, pattern: /'(?:[^'\\]|\\.)*?'/) @value_transformer = -> (s) { s.gsub('\\', '') } end
Public Instance Methods
as_hash(data)
click to toggle source
Calls superclass method
DDQL::TokenType::Literal#as_hash
# File lib/ddql/token_type.rb, line 195 def as_hash(data) if data&.strip.each_byte.all? { |e| e == 0x30 } Integer.new.as_hash(data.to_i) else super end end
data_type()
click to toggle source
# File lib/ddql/token_type.rb, line 203 def data_type name end