Class: CanTango::PermitEngine::Executor::Abstract

Inherits:
Object
  • Object
show all
Includes:
Helpers::Debug
Defined in:
lib/cantango/permit_engine/executor/abstract.rb

Direct Known Subclasses

Base, System

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::Debug

#debug

Constructor Details

#initialize(permit) ⇒ Abstract

Returns a new instance of Abstract.



9
10
11
# File 'lib/cantango/permit_engine/executor/abstract.rb', line 9

def initialize permit
  @permit = permit
end

Instance Attribute Details

#permitObject

Returns the value of attribute permit.



7
8
9
# File 'lib/cantango/permit_engine/executor/abstract.rb', line 7

def permit
  @permit
end

Instance Method Details

#execute!Object



17
18
19
# File 'lib/cantango/permit_engine/executor/abstract.rb', line 17

def execute!
  raise "Must be implemented by subclass"
end

#permit?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/cantango/permit_engine/executor/abstract.rb', line 13

def permit?
  permit.permit? if permit
end