Sha256: 2921d6294e4f35781a3d34f7098fae1c49c6d208022aeab13384a6db8d7016f9

Contents?: true

Size: 643 Bytes

Versions: 6

Compression:

Stored size: 643 Bytes

Contents

class Remnant
  class Configuration
    # environment of application
    attr_reader :env

    # hostname to send to
    attr_reader :hostname

    # port to send to
    attr_reader :port_number

    # api key to use with payloads
    attr_reader :tag

    def host(value)
      @hostname = value
    end

    def port(value)
      @port_number = value
    end

    def tagged(value)
      @tag = value
    end

    def environment(value)
      @env = value
    end

    def defaults!
      # configure some defaults

      @hostname = '127.0.0.1'
      @port_number = 8125
      @tag = 'remnant'

      self
    end # end defaults!
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
remnant-0.2.1 lib/remnant/configuration.rb
remnant-0.2.0 lib/remnant/configuration.rb
remnant-0.1.3 lib/remnant/configuration.rb
remnant-0.1.2 lib/remnant/configuration.rb
remnant-0.1.1 lib/remnant/configuration.rb
remnant-0.1.0 lib/remnant/configuration.rb