Sha256: f4f74c44c15dd88504616c661b4469841efbd31f572546590772eef4d382776f

Contents?: true

Size: 455 Bytes

Versions: 1

Compression:

Stored size: 455 Bytes

Contents

class Shoes
  class Progress
    include Common::UIElement
    include Common::Style

    style_with :common_styles, :dimensions, :fraction
    STYLES = { fraction: 0.0 }.freeze

    def after_initialize(*_)
      @gui.fraction = @style[:fraction]
      update_visibility
    end

    def handle_block(*_)
      # No-op since we're not clickable
    end

    def fraction=(value)
      style(fraction: value)
      @gui.fraction = value
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-core-4.0.0.pre7 lib/shoes/progress.rb