Class: UnderOs::UI::Progress

Inherits:
View
  • Object
show all
Defined in:
lib/under_os/ui/progress.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Progress

Returns a new instance of Progress.



4
5
6
7
8
# File 'lib/under_os/ui/progress.rb', line 4

def initialize(options={})
  super

  self.value = options[:value] if options[:value]
end

Instance Method Details

#valueObject



10
11
12
# File 'lib/under_os/ui/progress.rb', line 10

def value
  @_.progress
end

#value=(value) ⇒ Object



14
15
16
# File 'lib/under_os/ui/progress.rb', line 14

def value=(value)
  @_.setProgress value.to_f, animated: true
end