Class: YuiRestClient::Widgets::Progressbar

Inherits:
Base
  • Object
show all
Defined in:
lib/yui_rest_client/widgets/progressbar.rb

Overview

Class representing a Progressbar in UI. It can be YProgressBar.

Instance Method Summary collapse

Methods inherited from Base

#action, #collect_all, #debug_label, #enabled?, #exists?, #initialize, #property

Methods included from YuiRestClient::Waitable

#wait_until, #wait_while

Constructor Details

This class inherits a constructor from YuiRestClient::Widgets::Base

Instance Method Details

#max_valueInteger

Returns the max value of progressbar. Gets value from ‘max_value’ parameter in JSON representation of YProgressBar.

Examples:

Get progressbar max_value, with id ‘initProg’

{
  "class" : "YProgressBar",
  "hstretch" : true,
  "id" : "initProg",
  "label" : "Disk",
  "max_value" : 1000,
  "value" : 666
}
app.progressbar(id: 'initProg').max_value
  # 1000

Returns:

  • (Integer)

    max value of the progressbar.



40
41
42
# File 'lib/yui_rest_client/widgets/progressbar.rb', line 40

def max_value
  property(:max_value)
end

#valueInteger

Returns the current value of progressbar. Gets value from ‘value’ parameter in JSON representation of YProgressBar.

Examples:

Get progressbar value, with id ‘initProg’

{
  "class" : "YProgressBar",
  "hstretch" : true,
  "id" : "initProg",
  "label" : "Disk",
  "max_value" : 1000,
  "value" : 666
}
app.progressbar(id: 'initProg').value
  # 663

Returns:

  • (Integer)

    current value of progressbar.



21
22
23
# File 'lib/yui_rest_client/widgets/progressbar.rb', line 21

def value
  property(:value)
end