Class: UseCase::Base

Inherits:
Object
  • Object
show all
Includes:
BaseClassMethod
Defined in:
lib/usecasing/base.rb

Overview

BaseClassMethod

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from BaseClassMethod

included

Constructor Details

#initialize(context) ⇒ Base

Returns a new instance of Base.



61
62
63
# File 'lib/usecasing/base.rb', line 61

def initialize(context)
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



60
61
62
# File 'lib/usecasing/base.rb', line 60

def context
  @context
end

Instance Method Details

#beforeObject



65
# File 'lib/usecasing/base.rb', line 65

def before;  end

#failure(key, value) ⇒ Object



69
70
71
# File 'lib/usecasing/base.rb', line 69

def failure(key, value)
  @context.failure(key, value)
end

#performObject



66
# File 'lib/usecasing/base.rb', line 66

def perform;  end

#rollbackObject



67
# File 'lib/usecasing/base.rb', line 67

def rollback; end