class TheFox::Timr::Status

Used as Task and Track Status.

Attributes

long_status[R]

Resolved by short_status. See set_long_status method.

short_status[R]

Source Data

Public Class Methods

new(short_status) click to toggle source
# File lib/timr/status.rb, line 24
def initialize(short_status)
    @short_status = short_status
    
    @long_status = nil
    set_long_status
end

Public Instance Methods

colorized() click to toggle source

Use term/ansicolor to colorize the Long Status.

# File lib/timr/status.rb, line 32
def colorized
    case @short_status
    when ?R
        green(@long_status)
    when ?S
        red(@long_status)
    else
        @long_status
    end
end
to_s() click to toggle source

To String

# File lib/timr/status.rb, line 44
def to_s
    long_status
end