class Bh::Classes::AlertBox
Private Class Methods
contexts()
click to toggle source
@return [Hash<Symbol, String>] the class that Bootstrap requires to
append to an alert box based on its context.
# File lib/bh/classes/alert_box.rb, line 23 def self.contexts HashWithIndifferentAccess.new(:'alert-info').tap do |klass| klass[:alert] = :'alert-danger' klass[:danger] = :'alert-danger' klass[:info] = :'alert-info' klass[:notice] = :'alert-success' klass[:success] = :'alert-success' klass[:warning] = :'alert-warning' end end
Public Instance Methods
context_class()
click to toggle source
@return [#to_s] the content-related class to assign to the alert box.
# File lib/bh/classes/alert_box.rb, line 7 def context_class AlertBox.contexts[@options.fetch :context, @options[:priority]] end