class NoSE::Serialize::SearchResultRepresenter
Represent results of a search operation
Public Instance Methods
command()
click to toggle source
The full command used to generate the results @return [String]
# File lib/nose/serialize.rb, line 752 def command "#{$PROGRAM_NAME} #{ARGV.join ' '}" end
cost_model()
click to toggle source
The backend cost model used to generate the schema @return [Hash]
# File lib/nose/serialize.rb, line 703 def cost_model options = represented.cost_model.instance_variable_get(:@options) options[:name] = represented.cost_model.subtype_name options end
cost_model=(options)
click to toggle source
Look up the cost model by name and attach to the results @return [void]
# File lib/nose/serialize.rb, line 711 def cost_model=(options) options = options.deep_symbolize_keys cost_model_class = Cost::Cost.subtype_class(options[:name]) represented.cost_model = cost_model_class.new(**options) end
revision()
click to toggle source
Include the revision of the code used to generate this output @return [String]
# File lib/nose/serialize.rb, line 730 def revision `git rev-parse HEAD 2> /dev/null`.strip end
time()
click to toggle source
The time the results were generated @return [Time]
# File lib/nose/serialize.rb, line 738 def time Time.now.rfc2822 end
time=(time)
click to toggle source
Reconstruct the time object from the timestamp @return [void]
# File lib/nose/serialize.rb, line 744 def time=(time) represented.time = Time.rfc2822 time end