class Lebowski::Foundation::Panes::AlertPane
Represents a proxy to a SproutCore alert pane (SC.AlertPane)
Constants
- ALERT_PROPERTY_TYPE
- ALERT_TYPES
- ALERT_TYPE_ERROR
- ALERT_TYPE_INFO
- ALERT_TYPE_PLAIN
- ALERT_TYPE_WARN
- BUTTONS
- BUTTON_ONE
- BUTTON_THREE
- BUTTON_TWO
Public Instance Methods
is_alert?()
click to toggle source
# File lib/lebowski/foundation/panes/alert.rb, line 56 def is_alert?() return is_type?(:alert) end
Also aliased as: is_warn?
is_error?()
click to toggle source
# File lib/lebowski/foundation/panes/alert.rb, line 62 def is_error?() return is_type?(:error) end
is_info?()
click to toggle source
# File lib/lebowski/foundation/panes/alert.rb, line 66 def is_info?() return is_type?(:info) end
is_plain?()
click to toggle source
# File lib/lebowski/foundation/panes/alert.rb, line 70 def is_plain?() return is_type?(:plain) end
is_type?(key)
click to toggle source
# File lib/lebowski/foundation/panes/alert.rb, line 48 def is_type?(key) if (not ALERT_TYPES.has_key?(key)) raise ArgumentError.new "require valid key: #{key}" end return (not (self[ALERT_PROPERTY_TYPE] =~ /#{ALERT_TYPES[key]}/i).nil?) end
type()
click to toggle source
# File lib/lebowski/foundation/panes/alert.rb, line 40 def type() return :alert if is_alert? return :error if is_error? return :info if is_info? return :plain if is_plain? return "" end