Module: NfgUi::Bootstrap::Utilities::Progressable

Included in:
Components::Progress, Components::ProgressBar
Defined in:
lib/nfg_ui/bootstrap/utilities/progressable.rb

Overview

Shared methods between Progress & ProgressBar.

Instance Method Summary collapse

Instance Method Details

#animatedObject



8
9
10
# File 'lib/nfg_ui/bootstrap/utilities/progressable.rb', line 8

def animated
  options.fetch(:animated, false)
end

#labelObject



12
13
14
# File 'lib/nfg_ui/bootstrap/utilities/progressable.rb', line 12

def label
  options[:label] == true ? "#{progress}%" : options[:label] || body
end

#progressObject



16
17
18
# File 'lib/nfg_ui/bootstrap/utilities/progressable.rb', line 16

def progress
  options[:progress] || 0
end

#stripedObject



20
21
22
# File 'lib/nfg_ui/bootstrap/utilities/progressable.rb', line 20

def striped
  options.fetch(:striped, false)
end

#themeObject



24
25
26
# File 'lib/nfg_ui/bootstrap/utilities/progressable.rb', line 24

def theme
  options.fetch(:theme, nil)
end