Class: ThreeScale::Backend::Validators::ServiceState

Inherits:
Base
  • Object
show all
Defined in:
lib/3scale/backend/validators/service_state.rb

Instance Attribute Summary

Attributes inherited from Base

#params, #status

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

#applyObject



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