Module: MakeVoteable

Defined in:
lib/make_voteable.rb,
lib/make_voteable/voter.rb,
lib/make_voteable/voting.rb,
lib/make_voteable/version.rb,
lib/make_voteable/voteable.rb,
lib/make_voteable/exceptions.rb

Defined Under Namespace

Modules: Exceptions, Voteable, Voter Classes: Voting

Constant Summary collapse

VERSION =
"0.1.1"

Instance Method Summary collapse

Instance Method Details

#make_voteableObject

Specify a model as voteable.

Example: class Question < ActiveRecord::Base

make_voteable

end



21
22
23
# File 'lib/make_voteable.rb', line 21

def make_voteable 
  include Voteable
end

#make_voterObject

Specify a model as voter.

Example: class User < ActiveRecord::Base

make_voter

end



31
32
33
# File 'lib/make_voteable.rb', line 31

def make_voter
  include Voter
end

#voteable?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/make_voteable.rb', line 7

def voteable?
  false
end

#voter?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/make_voteable.rb', line 11

def voter?
  false
end