Module: BabySqueel::Compat::DSL
- Defined in:
- lib/baby_squeel/compat.rb
Instance Method Summary collapse
-
#`(str) ⇒ Object
An alias for BabySqueel::DSL#sql.
-
#evaluate(&block) ⇒ Object
Remember the original binding of the block.
-
#my(&block) ⇒ Object
Allows you to call out of an instance_eval’d block.
Instance Method Details
#`(str) ⇒ Object
An alias for BabySqueel::DSL#sql
13 14 15 |
# File 'lib/baby_squeel/compat.rb', line 13 def `(str) sql(str) end |
#evaluate(&block) ⇒ Object
Remember the original binding of the block
23 24 25 26 |
# File 'lib/baby_squeel/compat.rb', line 23 def evaluate(&block) @caller = block.binding.eval('self') super end |
#my(&block) ⇒ Object
Allows you to call out of an instance_eval’d block.
18 19 20 |
# File 'lib/baby_squeel/compat.rb', line 18 def my(&block) @caller.instance_eval(&block) end |