Sha256: 1d4f194dea2c2c44e4b79afb17fb7ae7b07c8602c50b7acf49e8a8523a8216c2

Contents?: true

Size: 1.6 KB

Versions: 10

Compression:

Stored size: 1.6 KB

Contents

module NSISam
  class Client
    class Configuration
      class << self
        # Set the default {NSISam::Client} user
        #
        #
        # @param [String] user to set
        #
        # @return [String] the user set
        def user(user = nil)
          @user = user unless user.nil?
          @user
        end

        # Set the default {NSISam::Client} password
        #
        #
        # @param [String] password to set
        #
        # @return [String] the password set
        def password(password = nil)
          @password = password unless password.nil?
          @password
        end

        # Set the default {NSISam::Client} host
        #
        #
        # @param [String] host to set
        #
        # @return [String] the host set
        def host(host = nil)
          @host = host unless host.nil?
          @host
        end

        # Set the default {NSISam::Client} port
        #
        #
        # @param [String] port to set
        #
        # @return [String] the port set
        def port(port = nil)
          @port = port unless port.nil?
          @port
        end

        # Set the default {NSISam::Client} expire time
        #
        #
        # @param [Fixnum] expire time to set
        #
        # @return [Fixnum] the expire set
        def expire(expire = nil)
          @expire = expire unless expire.nil?
          @expire
        end

        # See how are the settings
        #
        # @return [Hash] actual settings
        def settings
          {user: @user, password: @password, host: @host, port: @port, expire: @expire}
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
nsisam-0.7.7 lib/nsisam/configuration.rb
nsisam-0.7.6 lib/nsisam/configuration.rb
nsisam-0.7.5 lib/nsisam/configuration.rb
nsisam-0.7.4 lib/nsisam/configuration.rb
nsisam-0.7.3 lib/nsisam/configuration.rb
nsisam-0.7.2 lib/nsisam/configuration.rb
nsisam-0.7.1 lib/nsisam/configuration.rb
nsisam-0.7.0 lib/nsisam/configuration.rb
nsisam-0.6.4 lib/nsisam/configuration.rb
nsisam-0.6.3 lib/nsisam/configuration.rb