Method: Feature.with
- Defined in:
- lib/feature.rb
.with(feature) ⇒ Object
Execute the given block if feature is active
84 85 86 87 88 |
# File 'lib/feature.rb', line 84 def self.with(feature) raise ArgumentError, "no block given to #{__method__}" unless block_given? yield if active?(feature) end |