Sha256: 2b7975f3419326e4342f2aa67eb0f858c6adbdf3f641514f2dd2412e755dea8c

Contents?: true

Size: 384 Bytes

Versions: 1

Compression:

Stored size: 384 Bytes

Contents

# frozen_string_literal: true

module ElectionBuddy
  class Validation
    def initialize(response)
      @response = response
    end

    def identifier
      @response["validation_identifier"] || "Not available"
    end

    def done?
      @response["error"].nil?
    end

    def error
      return nil if done?

      ErrorFormatter.format(@response["error"])
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
electionbuddy-ruby-0.2.0 lib/election_buddy/entities/validation.rb