Module: BabySqueel::Compat::DSL

Defined in:
lib/baby_squeel/compat.rb

Instance Method Summary collapse

Instance Method Details

#`(str) ⇒ Object

An alias for BabySqueel::DSL#sql



53
54
55
# File 'lib/baby_squeel/compat.rb', line 53

def `(str)
  sql(str)
end

#evaluate(&block) ⇒ Object

Remember the original binding of the block



63
64
65
66
# File 'lib/baby_squeel/compat.rb', line 63

def evaluate(&block)
  @caller = block.binding.eval('self')
  super
end

#my(&block) ⇒ Object

Allows you to call out of an instance_eval’d block.



58
59
60
# File 'lib/baby_squeel/compat.rb', line 58

def my(&block)
  @caller.instance_eval(&block)
end