app/models/bento_search/results.rb in bento_search-0.0.1 vs app/models/bento_search/results.rb in bento_search-0.5.0
- old
+ new
@@ -28,11 +28,16 @@
# depends on the service. may be nil.
# [:exception]
# Possibly a ruby exception object. may be nil.
attr_accessor :error
- # time it took to do search, in seconds.
+ # time it took to do search, in seconds as float
attr_accessor :timing
+ # timing from #timing, but in miliseconds as int
+ def timing_ms
+ return nil if timing.nil?
+ (timing * 1000).to_i
+ end
# search arguments as normalized by SearchEngine, not neccesarily
# directly as input. A hash.
attr_accessor :search_args
# Registered id of engine used to create these results,