Class: Qiita::Elasticsearch::DateToken

Inherits:
Token
  • Object
show all
Includes:
Concerns::RangeOperandIncludable
Defined in:
lib/qiita/elasticsearch/date_token.rb

Defined Under Namespace

Classes: AbsoluteDateExpression, BaseDateExpression, RelativeDateExpression

Constant Summary

Constants included from Concerns::RangeOperandIncludable

Concerns::RangeOperandIncludable::RANGE_TERM_REGEXP

Instance Attribute Summary collapse

Attributes inherited from Token

#field_name, #options, #term

Instance Method Summary collapse

Methods included from Concerns::RangeOperandIncludable

#range_parameter, #range_query

Methods inherited from Token

#downcased?, #downcased_term, #filter?, #initialize, #must?, #must_not?, #negative?, #or?, #positive?, #proper_cased_term, #query?, #quoted?, #sort?, #to_s, #type?

Constructor Details

This class inherits a constructor from Qiita::Elasticsearch::Token

Instance Attribute Details

#time_zoneObject

Returns the value of attribute time_zone.



11
12
13
# File 'lib/qiita/elasticsearch/date_token.rb', line 11

def time_zone
  @time_zone
end

Instance Method Details

#to_hashHash

Returns:

  • (Hash)


143
144
145
146
147
148
149
# File 'lib/qiita/elasticsearch/date_token.rb', line 143

def to_hash
  if date
    date.to_hash
  else
    Nodes::NullNode.new.to_hash
  end
end