class Tire::SuggestPlugin::Params
Public Class Methods
new(params={})
click to toggle source
# File lib/tire/suggest_plugin/params.rb, line 5 def initialize(params={}) AVAILABLE_PARAMS.each do |param_name| send("#{param_name}=", params[param_name]) end end
Public Instance Methods
to_hash()
click to toggle source
# File lib/tire/suggest_plugin/params.rb, line 25 def to_hash result = {} AVAILABLE_PARAMS.each do |param_name| result[param_name] = send(param_name) end result end
to_json()
click to toggle source
# File lib/tire/suggest_plugin/params.rb, line 21 def to_json MultiJson.dump(self.to_hash) end