Module: LoadingScreen::LoadingScreenHelper

Defined in:
app/helpers/loading_screen/loading_screen_helper.rb

Instance Method Summary collapse

Instance Method Details

#loading_screen(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/helpers/loading_screen/loading_screen_helper.rb', line 6

def loading_screen(options={})
  options[:style] = :default unless options[:style]
  @background = 'background-color: ' + options[:background] if options[:background]
  @color = 'background-color: ' + options[:color] if options[:color]
   :div, '', class: 'loading_screen-spinner', style: @background do
    if options[:gif].present?
      gif_handler options
    else
      css_handler options
    end
  end
end