Class: ActiveRecord::ConnectionAdapters::Elasticsearch::Type::FormatString

Inherits:
Type::String
  • Object
show all
Defined in:
lib/active_record/connection_adapters/elasticsearch/type/format_string.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FormatString

Returns a new instance of FormatString.



8
9
10
11
# File 'lib/active_record/connection_adapters/elasticsearch/type/format_string.rb', line 8

def initialize(**args)
  @format = args.delete(:format).presence || /.*/
  super
end

Instance Attribute Details

#formatObject (readonly)

Returns the value of attribute format.



6
7
8
# File 'lib/active_record/connection_adapters/elasticsearch/type/format_string.rb', line 6

def format
  @format
end

Instance Method Details

#typeObject



13
14
15
# File 'lib/active_record/connection_adapters/elasticsearch/type/format_string.rb', line 13

def type
  :format_string
end