Module: VoteableAcandael::InstanceMethods

Defined in:
lib/voteable-acandael.rb

Instance Method Summary collapse

Instance Method Details

#my_instance_methodObject



15
16
17
# File 'lib/voteable-acandael.rb', line 15

def my_instance_method
  puts "module's instance method"
end

#total_votesObject



11
12
13
# File 'lib/voteable-acandael.rb', line 11

def total_votes
self.votes.where(vote: true).size - self.votes.where(vote: false).size
end