module Qipowl

@author Alexei Matyushkin

Constants

BTRACE_COUNT
ENTITIES
VERSION

Public Instance Methods

[](key) click to toggle source
# File lib/qipowl.rb, line 26
def [](key)
  config[key.to_sym]
end
configure(&block) click to toggle source

A wrapper for the configuration block

# File lib/qipowl.rb, line 22
def configure &block
  instance_eval(&block)
end

Private Instance Methods

add(key, value) click to toggle source
# File lib/qipowl.rb, line 36
def add(key, value)
  config[key.to_sym] = [*config[key.to_sym]] << value
end
config() click to toggle source
# File lib/qipowl.rb, line 40
def config
  @config ||= Hash.new
end
method_missing(sym, *args) click to toggle source
# File lib/qipowl.rb, line 44
def method_missing(sym, *args)
  if sym.to_s =~ /(.+)=$/
    config[$1.to_sym] = args.first
  else
    config[sym.to_sym]
  end
end
set(key, value) click to toggle source
# File lib/qipowl.rb, line 32
def set(key, value)
  config[key.to_sym] = value
end