Class: Inch::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/inch/config.rb,
lib/inch/config/base.rb,
lib/inch/config/codebase.rb

Overview

Stores the configuration for Inch

See Also:

  • config/defaultsconfig/defaults.rb

Defined Under Namespace

Classes: Base, Codebase

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.instanceObject

Returns the value of attribute instance.



7
8
9
# File 'lib/inch/config.rb', line 7

def instance
  @instance
end

Class Method Details

.codebaseObject



9
10
11
12
# File 'lib/inch/config.rb', line 9

def codebase
  self.instance ||= Config::Base.new
  instance.codebase
end

.run(&block) ⇒ Object



14
15
16
17
18
# File 'lib/inch/config.rb', line 14

def run(&block)
  self.instance ||= Config::Base.new
  instance.update(&block)
  instance
end