Sha256: 498969d10c1d1e816f5015b8e0cb79c2345387b37c1b36f36a1bb0627cd6f497

Contents?: true

Size: 328 Bytes

Versions: 1

Compression:

Stored size: 328 Bytes

Contents

require 'playa/view'

module Playa
  class ProgressView < View
    private

    def output
      { 'progress' => [ progress ] }
    end

    def type
      :raw
    end

    def progress
      '|' * (object.progress * view_width).ceil
    end

    def view_width
      @_width ||= Vedeu.view('progress').width
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
playa-0.0.7 lib/playa/progress_view.rb