Class: ThreeScale::Backend::Validators::ServiceState
- Defined in:
- lib/3scale/backend/validators/service_state.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#application, apply, #fail!, #initialize, #service, #succeed!
Constructor Details
This class inherits a constructor from ThreeScale::Backend::Validators::Base
Instance Method Details
#apply ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/3scale/backend/validators/service_state.rb', line 5 def apply if service.active? succeed! else fail!(ServiceNotActive.new) end end |