Class: Beetle::RC::ReturnCode

Inherits:
Object
  • Object
show all
Defined in:
lib/beetle/r_c.rb

Overview

message processing result return codes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ReturnCode

Returns a new instance of ReturnCode.



8
9
10
11
12
# File 'lib/beetle/r_c.rb', line 8

def initialize(*args)
  @reject = args.delete :reject
  @failure = args.delete :failure
  @name = args.first
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/beetle/r_c.rb', line 6

def name
  @name
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/beetle/r_c.rb', line 22

def failure?
  @failure
end

#inspectObject



14
15
16
# File 'lib/beetle/r_c.rb', line 14

def inspect
  @name.blank? ? super : "Beetle::RC::#{@name}"
end

#reject?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/beetle/r_c.rb', line 18

def reject?
  @reject
end