module Service::Utils
Constants
- VERSION
Public Class Methods
false?(str)
click to toggle source
# File lib/service/utils.rb, line 14 def false?(str) return ["n", "no", "f", "false"].include?(str.to_s.strip.downcase) end
metadata(collection)
click to toggle source
# File lib/service/utils.rb, line 18 def metadata(collection) return { current_page: collection.current_page, per_page: collection.page_size, prev_page: collection.prev_page, next_page: collection.next_page, total_pages: collection.page_count, total_count: collection.pagination_record_count } end
true?(str)
click to toggle source
# File lib/service/utils.rb, line 10 def true?(str) return ["y", "yes", "t", "true"].include?(str.to_s.strip.downcase) end