Sha256: d137aa596eb61b96ac6646657816aeffc0ee5151f264404dee00c1b16fc3bddc

Contents?: true

Size: 668 Bytes

Versions: 5

Compression:

Stored size: 668 Bytes

Contents

module PansophyAuthenticator
  module Configuration
    module Verification
      class Local
        def initialize(configuration)
          @configuration = configuration
        end

        def verify
          Result.new errors
        end

        private

        def errors
          return ['File path is not defined'] unless file_path?
          return ["#{file_path} does not exist"] unless file_exist?
          []
        end

        def file_path?
          !file_path.nil?
        end

        def file_exist?
          File.exist? file_path
        end

        def file_path
          @configuration.file_path
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pansophy_authenticator-0.4.3 lib/pansophy_authenticator/configuration/verification/local.rb
pansophy_authenticator-0.4.2 lib/pansophy_authenticator/configuration/verification/local.rb
pansophy_authenticator-0.4.1 lib/pansophy_authenticator/configuration/verification/local.rb
pansophy_authenticator-0.4.0 lib/pansophy_authenticator/configuration/verification/local.rb
pansophy_authenticator-0.3.0 lib/pansophy_authenticator/configuration/verification/local.rb