Class: Decidim::Elections::VoteFlow::VoteCheckResult

Inherits:
Object
  • Object
show all
Defined in:
decidim-elections/app/services/decidim/elections/vote_flow.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allowed:, error_message:, exit_path: nil) ⇒ VoteCheckResult

Returns a new instance of VoteCheckResult.



95
96
97
98
99
# File 'decidim-elections/app/services/decidim/elections/vote_flow.rb', line 95

def initialize(allowed:, error_message:, exit_path: nil)
  @allowed = allowed
  @error_message = error_message unless allowed
  @exit_path = exit_path
end

Instance Attribute Details

#error_messageObject (readonly)

Returns the value of attribute error_message.



101
102
103
# File 'decidim-elections/app/services/decidim/elections/vote_flow.rb', line 101

def error_message
  @error_message
end

#exit_pathObject (readonly)

Returns the value of attribute exit_path.



101
102
103
# File 'decidim-elections/app/services/decidim/elections/vote_flow.rb', line 101

def exit_path
  @exit_path
end

Instance Method Details

#allowed?Boolean

Returns:

  • (Boolean)


103
104
105
# File 'decidim-elections/app/services/decidim/elections/vote_flow.rb', line 103

def allowed?
  @allowed
end