module Popular::Extenders::Popular
Namespace for classes and modules that handle making a given model popular
Public Class Methods
popular?()
click to toggle source
# File lib/popular/extenders/popular.rb, line 30 def self.popular? true end
Public Instance Methods
popular(*args)
click to toggle source
Includes the module in a given class
@overload popular *args
@param [Hash] options @option args [Boolean] :friendship_profile whether or not friendships should create a friendship_profile
# File lib/popular/extenders/popular.rb, line 21 def popular *args require 'popular/popular' include ::Popular::Popular args.extract_options!.each do |key, val| send "#{key}=", val end class_eval do def self.popular? true end end end
popular?()
click to toggle source
Helper method for determining whether or not a model has included the Popular
module
@return [Boolean] whether or not the including class has included the module
# File lib/popular/extenders/popular.rb, line 12 def popular? false end