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_json(options = {}) ⇒ Object



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

def to_json(options={})
  to_hash.to_json
end