Class: Resulang::Dsl
- Inherits:
-
Object
- Object
- Resulang::Dsl
- Defined in:
- lib/resulang/dsl.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ Dsl
constructor
A new instance of Dsl.
- #resume ⇒ Object
Constructor Details
#initialize(path) ⇒ Dsl
Returns a new instance of Dsl.
9 10 11 12 |
# File 'lib/resulang/dsl.rb', line 9 def initialize(path) @path = path @resume = Resume.new end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/resulang/dsl.rb', line 3 def path @path end |
Class Method Details
.register_section!(section, klass) ⇒ Object
5 6 7 |
# File 'lib/resulang/dsl.rb', line 5 def self.register_section!(section, klass) define_section_method(section, klass) end |
Instance Method Details
#resume ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/resulang/dsl.rb', line 14 def resume unless @evaluated instance_eval(File.read(path)) @evaluated = true end @resume end |