Class: Inch::Config::Base
- Inherits:
-
Object
- Object
- Inch::Config::Base
- Defined in:
- lib/inch/config/base.rb
Instance Attribute Summary collapse
-
#language ⇒ Object
readonly
Returns the value of attribute language.
Instance Method Summary collapse
- #codebase(&block) ⇒ Object
- #evaluation(&block) ⇒ Object
-
#initialize(language) ⇒ Base
constructor
A new instance of Base.
- #update(&block) ⇒ Object
Constructor Details
#initialize(language) ⇒ Base
Returns a new instance of Base.
9 10 11 |
# File 'lib/inch/config/base.rb', line 9 def initialize(language) @language = language.to_sym end |
Instance Attribute Details
#language ⇒ Object (readonly)
Returns the value of attribute language.
7 8 9 |
# File 'lib/inch/config/base.rb', line 7 def language @language end |
Instance Method Details
#codebase(&block) ⇒ Object
18 19 20 21 22 |
# File 'lib/inch/config/base.rb', line 18 def codebase(&block) @codebase ||= Config::Codebase.new(@language) @codebase.update(&block) if block @codebase end |
#evaluation(&block) ⇒ Object
24 25 26 27 28 |
# File 'lib/inch/config/base.rb', line 24 def evaluation(&block) @evaluation ||= Config::Evaluation.new(@language) @evaluation.update(&block) if block @evaluation end |
#update(&block) ⇒ Object
13 14 15 16 |
# File 'lib/inch/config/base.rb', line 13 def update(&block) instance_eval(&block) self end |