Class: OstrichPoll::ExitStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/ostrichpoll/exit_status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code) ⇒ ExitStatus

Returns a new instance of ExitStatus.



6
7
8
9
# File 'lib/ostrichpoll/exit_status.rb', line 6

def initialize(message, code)
  @message = message
  @code = code
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



4
5
6
# File 'lib/ostrichpoll/exit_status.rb', line 4

def code
  @code
end

#messageObject

Returns the value of attribute message.



4
5
6
# File 'lib/ostrichpoll/exit_status.rb', line 4

def message
  @message
end

Instance Method Details

#exitObject



11
12
13
14
# File 'lib/ostrichpoll/exit_status.rb', line 11

def exit
  puts @message
  Kernel.exit @code
end