Class: Tire::Search::ScriptField

Inherits:
Object
  • Object
show all
Defined in:
lib/tire/search/script_field.rb

Overview

Instance Method Summary collapse

Constructor Details

#initialize(name, options) ⇒ ScriptField

Returns a new instance of ScriptField.



9
10
11
# File 'lib/tire/search/script_field.rb', line 9

def initialize(name, options)
  @hash = { name => options }
end

Instance Method Details

#to_hashObject



17
18
19
# File 'lib/tire/search/script_field.rb', line 17

def to_hash
  @hash
end

#to_jsonObject



13
14
15
# File 'lib/tire/search/script_field.rb', line 13

def to_json
  to_hash.to_json
end