Class: VotingSystems::Founding
- Inherits:
-
VotingSystem
- Object
- VotingSystem
- VotingSystems::Founding
- Defined in:
- app/models/voting_systems.rb
Class Method Summary (collapse)
- + (Boolean) can_be_closed_early?(proposal)
- + (Object) description(options = {})
- + (Object) long_description(options = {})
- + (Boolean) passed?(proposal)
Methods inherited from VotingSystem
Class Method Details
+ (Boolean) can_be_closed_early?(proposal)
153 154 155 156 157 158 |
# File 'app/models/voting_systems.rb', line 153 def self.can_be_closed_early?(proposal) # We need to give all the founding members an opportunity to vote, # so only close this proposal early if every member has cast a # vote. proposal.total_votes >= proposal.member_count end |
+ (Object) description(options = {})
144 145 146 |
# File 'app/models/voting_systems.rb', line 144 def self.description(={}) "At least three supporting votes" end |
+ (Object) long_description(options = {})
148 149 150 151 |
# File 'app/models/voting_systems.rb', line 148 def self.long_description(={}) are_received = [:include_received] ? " are received" : "" "at least three votes#{are_received} during the Voting Period." end |
+ (Boolean) passed?(proposal)
160 161 162 |
# File 'app/models/voting_systems.rb', line 160 def self.passed?(proposal) proposal.votes_for >= 3 end |