Class: VotingSystems::Founding

Inherits:
VotingSystem show all
Defined in:
app/models/voting_systems.rb

Class Method Summary (collapse)

Methods inherited from VotingSystem

simple_name

Class Method Details

+ (Boolean) can_be_closed_early?(proposal)

Returns:

  • (Boolean)


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(options={})
  "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(options={})
  are_received = options[:include_received] ? " are received" : ""
  "at least three votes#{are_received} during the Voting Period."
end

+ (Boolean) passed?(proposal)

Returns:

  • (Boolean)


160
161
162
# File 'app/models/voting_systems.rb', line 160

def self.passed?(proposal)
  proposal.votes_for >= 3
end