Module: ShinyThemes::RendersTheme::ClassMethods

Defined in:
lib/shiny_themes/renders_theme.rb

Instance Method Summary collapse

Instance Method Details

#renders_theme(name, options = {}) ⇒ Theme

Use the theme and options for all rendering in this controller option options [String] :layout ('application') Default layout for theme

Parameters:

  • name (String) —

    the name of the new theme

  • options (Hash) (defaults to: {}) —

    Options hash

Returns:

  • (Theme) —

    the theme for the controller



48
49
50
# File 'lib/shiny_themes/renders_theme.rb', line 48

def renders_theme(name, options = {})
  self.theme = Theme.new(options.merge(name: name, layout: options[:layout]))
end