Sha256: ea20a4cc603689219e61480f03462d82bcb2ec09b6eb0de0fe8f63d0fd598489
Contents?: true
Size: 779 Bytes
Versions: 9
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true module StatsLite class Configuration def initialize @port = 9111 @watch = ["config.rb"] end def port(_port = nil) _port ? @port = _port : @port end def app _app = StatsLite::App if block_given? yield app else _app end end def watch(_paths = nil) _paths ? @watch = _paths : @watch end def password(_pass = nil) _pass ? @password = _pass : @password end def data(_data = nil) _data ? @data = _data : @data end end class << self def configure config = @configuration ||= Configuration.new if block_given? yield config, StatsLite::Helper else config end end end end
Version data entries
9 entries across 9 versions & 1 rubygems