class DDQL::TokenType::Numeric

Public Class Methods

new() click to toggle source
Calls superclass method DDQL::TokenType::Literal::new
# File lib/ddql/token_type.rb, line 153
def initialize
  super(name: :numeric, pattern: /'((?!('|0\d)))((?>[+-]?)(?>(?>\d*)(?>\.?)(?>\d+)))'/)
  @value_transformer = -> (s) { s.to_f }
end

Public Instance Methods

data_type() click to toggle source
# File lib/ddql/token_type.rb, line 158
def data_type
  :float
end