Module: Matchd

Extended by:
Response::Factory, Rule::Factory
Defined in:
lib/matchd.rb,
lib/matchd/cli.rb,
lib/matchd/glue.rb,
lib/matchd/rule.rb,
lib/matchd/config.rb,
lib/matchd/server.rb,
lib/matchd/control.rb,
lib/matchd/helpers.rb,
lib/matchd/version.rb,
lib/matchd/registry.rb,
lib/matchd/response.rb

Defined Under Namespace

Modules: CLI, Config, Glue, Helpers Classes: Control, Registry, Response, Rule, Server

Constant Summary collapse

VERSION =
"0.1.0".freeze

Class Method Summary collapse

Methods included from Response::Factory

Response

Methods included from Rule::Factory

Rule

Class Method Details

.configure(&block) ⇒ Object



13
14
15
# File 'lib/matchd.rb', line 13

def self.configure(&block)
  Config.configure(&block)
end

.configure_from_file!(config_file = Config::DEFAULT_CONFIG_FILE) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/matchd.rb', line 17

def self.configure_from_file!(config_file = Config::DEFAULT_CONFIG_FILE)
  Config.configure do |config|
    YAML.load_file(config_file).each do |k, v|
      config.public_send("#{k}=", v)
    end
  end
end

.rootObject



25
26
27
# File 'lib/matchd.rb', line 25

def self.root
  File.expand_path('..', __dir__)
end