Sha256: 56da0b4ab1b81c1ad23962964b6fa3ac6b8f20b49e0626eb2869b03851dc6bdb

Contents?: true

Size: 464 Bytes

Versions: 2

Compression:

Stored size: 464 Bytes

Contents

class Pratt

  @@color = true

  class << self

    def color
      @@color
    end

    def color= color_bool
      @@color = color_bool
    end

    def color?
      @@color == true
    end

    # Calculate totals. I think this should be an instance method on Projects/?/Whences
    def totals hr, fmt = false
      "#{(hr / 24).format_integer.cyan} day #{(hr % 24).format_integer.yellow} hour #{(60*(hr -= hr.to_i)).format_integer.green} min"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
Pratt-1.6.5 lib/pratt/formatting.rb
Pratt-1.6.4 lib/pratt/formatting.rb