Sha256: 843cc5a27080414e0373590a132b6a4590bd6205c13dab32ef16fbe84b34fc56

Contents?: true

Size: 293 Bytes

Versions: 5

Compression:

Stored size: 293 Bytes

Contents

module PanicBoardData

  class ProgressBar

    attr_accessor :value

    def to_s
      "<td class=\"projectsBars\">#{bars}</td>"
    end

    private

    def bars
      (1..self.value).to_a
        .map { |x| "<div class=\"barSegment value#{x}\"></div>" }
        .join
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
panic_board_data-1.0.2 lib/panic_board_data/progress_bar.rb
panic_board_data-1.0.1 lib/panic_board_data/progress_bar.rb
panic_board_data-1.0.0 lib/panic_board_data/progress_bar.rb
panic_board_data-0.0.12 lib/panic_board_data/progress_bar.rb
panic_board_data-0.0.11 lib/panic_board_data/progress_bar.rb