Module: WheneverRoles
- Included in:
- WheneverRolesTest
- Defined in:
- lib/whenever_roles.rb,
lib/whenever_roles/version.rb
Constant Summary collapse
- KNOWN_ENVIRONMENTS =
[:production, :staging]
- VERSION =
"0.0.1"
Class Method Summary collapse
Class Method Details
.R(environments = [], *roles) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/whenever_roles.rb', line 7 def R(environments=[], *roles) if environments == :all environments = KNOWN_ENVIRONMENTS end environments.product(roles).map {|comb| comb.map(&:to_s).join('_') }.map(&:to_sym) end |