class Qiita::Elasticsearch::DateToken::BaseDateExpression

Constants

FIELD_NAMES_TABLE

Public Class Methods

new(token) click to toggle source

@param [DateToken] token date token instance containing date expressions

# File lib/qiita/elasticsearch/date_token.rb, line 20
def initialize(token)
  @token = token
end

Public Instance Methods

converted_field_name() click to toggle source

e.g. created:2000-01-01 -> created_at @return [String]

# File lib/qiita/elasticsearch/date_token.rb, line 34
def converted_field_name
  FIELD_NAMES_TABLE[@token.field_name] || @token.field_name
end
match() click to toggle source
# File lib/qiita/elasticsearch/date_token.rb, line 24
def match
  @match ||= self.class::PATTERN.match(@token.range_query || @token.term)
end
to_hash() click to toggle source
# File lib/qiita/elasticsearch/date_token.rb, line 28
def to_hash
  fail NotImplementedError
end