Module: VoteableAcandael::InstanceMethods
- Defined in:
- lib/voteable-acandael.rb
Instance Method Summary collapse
Instance Method Details
#my_instance_method ⇒ Object
15 16 17 |
# File 'lib/voteable-acandael.rb', line 15 def my_instance_method puts "module's instance method" end |
#total_votes ⇒ Object
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 |