Module: Poise::Helpers::Fused
- Defined in:
- lib/poise/helpers/fused.rb
Overview
Resource mixin to create "fused" resources where the resource and provider are implemented in the same class.
Class Method Summary collapse
-
.action(name, &block) ⇒ Object
Define a provider action.
Class Method Details
.action(name, &block) ⇒ Object
Define a provider action. The block should contain the usual provider code.
77 78 79 80 81 82 83 |
# File 'lib/poise/helpers/fused.rb', line 77 def action(name, &block) fused_actions[name.to_sym] = block # Make sure this action is allowed, also sets the default if first. if respond_to?(:actions) actions(name.to_sym) end end |