Module: AyeCommander::Status::Readable

Included in:
Command, Resultable::Result
Defined in:
lib/aye_commander/status.rb

Overview

This module defines methods that allow to read and know about the status

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status


25
26
27
# File 'lib/aye_commander/status.rb', line 25

def status
  @status
end

Instance Method Details

#failure?Boolean

Boolean opposite of success

Returns:

  • (Boolean)

33
34
35
# File 'lib/aye_commander/status.rb', line 33

def failure?
  !success?
end

#success?Boolean

Whether or not the command is succesful

Returns:

  • (Boolean)

28
29
30
# File 'lib/aye_commander/status.rb', line 28

def success?
  self.class.succeeds.include?(status)
end