Module: Maid
- Defined in:
- lib/maid.rb,
lib/maid/version.rb
Defined Under Namespace
Modules: NumericExtensions, Tools Classes: App, Maid, Rule
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
-
.rules(&block) ⇒ Object
Define rules for the Maid instance.
-
.with_instance(instance) ⇒ Object
Execute the block with the Maid instance set to
instance
.
Class Method Details
.rules(&block) ⇒ Object
Define rules for the Maid instance.
19 20 21 |
# File 'lib/maid.rb', line 19 def rules(&block) @instance.instance_eval(&block) end |
.with_instance(instance) ⇒ Object
Execute the block with the Maid instance set to instance
.
11 12 13 14 15 16 |
# File 'lib/maid.rb', line 11 def with_instance(instance) @instance = instance result = yield @instance = nil result end |