Module: Bizness::Operation

Defined in:
lib/bizness/operation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorObject

Returns the value of attribute error.



2
3
4
# File 'lib/bizness/operation.rb', line 2

def error
  @error
end

Instance Method Details

#aborted?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/bizness/operation.rb', line 17

def aborted?
  !successful?
end

#callObject

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/bizness/operation.rb', line 9

def call
  raise NotImplementedError
end

#call!Object



4
5
6
7
# File 'lib/bizness/operation.rb', line 4

def call!
  run
  successful?
end

#successful?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/bizness/operation.rb', line 13

def successful?
  error.nil?
end

#to_hObject



21
22
23
# File 'lib/bizness/operation.rb', line 21

def to_h
  {}
end