Sha256: 36e470b12c47dbeb9c5682c136294eea399f595a72bca2a7ab09317bbf78c6b0

Contents?: true

Size: 452 Bytes

Versions: 24

Compression:

Stored size: 452 Bytes

Contents

module Castronaut

  class AuthenticationResult
    
    attr_reader :username, :error_message
        
    def initialize(username, error_message=nil)
      @username = username
      @error_message = error_message
      Castronaut.logger.info("#{self.class} - #{@error_message} for #{@username}") if @error_message && @username
    end
    
    def valid?
      error_message.nil?
    end
    
    def invalid?
      !valid?
    end
    
  end

end

Version data entries

24 entries across 24 versions & 5 rubygems

Version Path
masover-castronaut-0.4.4.4 lib/castronaut/authentication_result.rb
p8-castronaut-0.6.1.1 lib/castronaut/authentication_result.rb
relevance-castronaut-0.2.0 lib/castronaut/authentication_result.rb
relevance-castronaut-0.2.5 lib/castronaut/authentication_result.rb
relevance-castronaut-0.3.0 lib/castronaut/authentication_result.rb
relevance-castronaut-0.3.5 lib/castronaut/authentication_result.rb
relevance-castronaut-0.3.6 lib/castronaut/authentication_result.rb
relevance-castronaut-0.4.1 lib/castronaut/authentication_result.rb
relevance-castronaut-0.4.2 lib/castronaut/authentication_result.rb
relevance-castronaut-0.4.3 lib/castronaut/authentication_result.rb
relevance-castronaut-0.4.4 lib/castronaut/authentication_result.rb
relevance-castronaut-0.4.5 lib/castronaut/authentication_result.rb
relevance-castronaut-0.4.6 lib/castronaut/authentication_result.rb
relevance-castronaut-0.5.0 lib/castronaut/authentication_result.rb
relevance-castronaut-0.5.1 lib/castronaut/authentication_result.rb
relevance-castronaut-0.5.2 lib/castronaut/authentication_result.rb
relevance-castronaut-0.5.3 lib/castronaut/authentication_result.rb
relevance-castronaut-0.5.4 lib/castronaut/authentication_result.rb
relevance-castronaut-0.6.0 lib/castronaut/authentication_result.rb
relevance-castronaut-0.6.1 lib/castronaut/authentication_result.rb