class Naplug::Status
Constants
- STATUS
Public Class Methods
new(state = :unknown)
click to toggle source
# File lib/naplug/status.rb, line 22 def initialize(state = :unknown) @status = state end
states()
click to toggle source
# File lib/naplug/status.rb, line 18 def self.states STATUS.keys end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/naplug/status.rb, line 53 def <=>(other) case when self.to_i < other.to_i then -1 when self.to_i > other.to_i then 1 else 0 end end
to_i()
click to toggle source
# File lib/naplug/status.rb, line 45 def to_i STATUS[@status].i end
to_s()
click to toggle source
# File lib/naplug/status.rb, line 41 def to_s STATUS[@status].s end
to_y()
click to toggle source
# File lib/naplug/status.rb, line 49 def to_y STATUS[@status].y end