Class: Rbml::Base
Direct Known Subclasses
Cli, Doc, Procedural, Shell
Instance Attribute Summary collapse
-
#dsl ⇒ Object
Returns the value of attribute dsl.
Instance Method Summary collapse
-
#initialize(language = nil) ⇒ Base
constructor
A new instance of Base.
- #instance_eval_each(code, &blk) ⇒ Object
Constructor Details
#initialize(language = nil) ⇒ Base
Returns a new instance of Base.
6 7 8 |
# File 'lib/base.rb', line 6 def initialize(language=nil) @dsl = BlankSlate.new(language) end |
Instance Attribute Details
#dsl ⇒ Object
Returns the value of attribute dsl.
4 5 6 |
# File 'lib/base.rb', line 4 def dsl @dsl end |
Instance Method Details
#instance_eval_each(code, &blk) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/base.rb', line 10 def instance_eval_each(code, &blk) $breaker = BlockBreaker.new do |name, args, block| yield @dsl.__send__(name, *args, &block) end $breaker.__instance_eval__ &code end |