Class: Jisota::DSLBase

Inherits:
Object
  • Object
show all
Defined in:
lib/jisota/dsl_base.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



8
9
10
# File 'lib/jisota/dsl_base.rb', line 8

def method_missing(method, *args, &block)
  @outer.send(method, *args, &block)
end

Instance Method Details

#evaluate(&block) ⇒ Object



3
4
5
6
# File 'lib/jisota/dsl_base.rb', line 3

def evaluate(&block)
  @outer = eval("self", block.binding)
  instance_eval(&block)
end