Class: Inch::Config
- Inherits:
-
Object
- Object
- Inch::Config
- Defined in:
- lib/inch/config.rb
Overview
Stores the configuration for Inch
Defined Under Namespace
Classes: Evaluation
Class Attribute Summary collapse
-
.instance ⇒ Object
Returns the value of attribute instance.
Class Method Summary collapse
Instance Method Summary collapse
- #development! ⇒ Object
- #development? ⇒ Boolean
- #evaluation(&block) ⇒ Object
- #update(&block) ⇒ Object
Class Attribute Details
.instance ⇒ Object
Returns the value of attribute instance.
7 8 9 |
# File 'lib/inch/config.rb', line 7 def instance @instance end |
Class Method Details
.run(&block) ⇒ Object
9 10 11 12 13 |
# File 'lib/inch/config.rb', line 9 def run(&block) self.instance ||= new instance.update(&block) instance end |
Instance Method Details
#development! ⇒ Object
24 25 26 |
# File 'lib/inch/config.rb', line 24 def development! @development = true end |
#development? ⇒ Boolean
20 21 22 |
# File 'lib/inch/config.rb', line 20 def development? @development end |
#evaluation(&block) ⇒ Object
28 29 30 31 32 |
# File 'lib/inch/config.rb', line 28 def evaluation(&block) @evaluation ||= Evaluation.new @evaluation.update(&block) if block @evaluation end |
#update(&block) ⇒ Object
16 17 18 |
# File 'lib/inch/config.rb', line 16 def update(&block) instance_eval(&block) end |