Class: Rake::PseudoStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/rake/pseudo_status.rb

Overview

Exit status class for times the system just gives us a nil.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code = 0) ⇒ PseudoStatus

Returns a new instance of PseudoStatus.



9
10
11
# File 'lib/rake/pseudo_status.rb', line 9

def initialize(code=0)
  @exitstatus = code
end

Instance Attribute Details

#exitstatusObject (readonly)

:nodoc: all



7
8
9
# File 'lib/rake/pseudo_status.rb', line 7

def exitstatus
  @exitstatus
end

Instance Method Details

#>>(n) ⇒ Object



17
18
19
# File 'lib/rake/pseudo_status.rb', line 17

def >>(n)
  to_i >> n
end

#exited?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/rake/pseudo_status.rb', line 25

def exited?
  true
end

#stopped?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/rake/pseudo_status.rb', line 21

def stopped?
  false
end

#to_iObject



13
14
15
# File 'lib/rake/pseudo_status.rb', line 13

def to_i
  @exitstatus << 8
end