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.



57
58
59
# File 'lib/usecasing/base.rb', line 57

def initialize(context)
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



56
57
58
# File 'lib/usecasing/base.rb', line 56

def context
  @context
end

Instance Method Details

#failure(key, value) ⇒ Object



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

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

#performObject



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

def perform;  end

#rollbackObject



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

def rollback; end