Module: IsReviewable::Reviewable

Defined in:
lib/is_reviewable/reviewable.rb

Defined Under Namespace

Modules: ClassMethods, Finders, InstanceMethods

Constant Summary collapse

ASSOCIATION_CLASS =
::Review
CACHABLE_FIELDS =
[
  :reviews_count,
  :average_rating
].freeze
DEFAULTS =
{
  :accept_ip => false,
  :scale => 1..5 
}.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:


21
22
23
24
25
26
27
28
29
30
# File 'lib/is_reviewable/reviewable.rb', line 21

def self.included(base) #:nodoc:
  base.class_eval do
    extend ClassMethods
  end
  
  # Checks if this object reviewable or not.
  #
  def reviewable?; false; end
  alias :is_reviewable? :reviewable?
end

Instance Method Details

#reviewable?Boolean

Checks if this object reviewable or not.

Returns:

  • (Boolean)

28
# File 'lib/is_reviewable/reviewable.rb', line 28

def reviewable?; false; end