Sha256: e84fccdf09bb9729af4185151729723450aa7177dbd783950e3f25310e1c4746
Contents?: true
Size: 1.02 KB
Versions: 2
Compression:
Stored size: 1.02 KB
Contents
module Inch # Stores the configuration for Inch # # @see config/defaults.rb class Config class << self attr_accessor :instance def run(&block) self.instance ||= new instance.update(&block) instance end end def update(&block) instance_eval(&block) end def development? @development end def development! @development = true end def evaluation(&block) @evaluation ||= Evaluation.new @evaluation.update(&block) if block @evaluation end class Evaluation def update(&block) instance_eval(&block) end def grade(symbol, &block) ::Inch::Evaluation::Grade.grade(symbol, &block) end def priority(symbol, &block) ::Inch::Evaluation::PriorityRange.priority_range(symbol, &block) end def schema(constant_name, &block) constant = eval("::Inch::Evaluation::Proxy::#{constant_name}") constant.criteria(&block) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
inch-0.3.0.rc2 | lib/inch/config.rb |
inch-0.3.0.rc1 | lib/inch/config.rb |