Class: Dommy::CookieChangeEvent
- Defined in:
- lib/dommy/cookie_store.rb
Instance Attribute Summary collapse
-
#changed ⇒ Object
readonly
Returns the value of attribute changed.
-
#deleted ⇒ Object
readonly
Returns the value of attribute deleted.
Attributes inherited from Event
Instance Method Summary collapse
- #__js_get__(key) ⇒ Object
-
#initialize(type, init = nil) ⇒ CookieChangeEvent
constructor
A new instance of CookieChangeEvent.
Methods inherited from Event
#__js_call__, #__js_set__, #__prepare_for_dispatch__, #__record_path__, #__set_current_target__, #bubbles?, #default_prevented?, #immediate_propagation_stopped?, #init_event, #propagation_stopped?
Constructor Details
#initialize(type, init = nil) ⇒ CookieChangeEvent
Returns a new instance of CookieChangeEvent.
109 110 111 112 113 |
# File 'lib/dommy/cookie_store.rb', line 109 def initialize(type, init = nil) super @changed = Array(read_init(init, "changed") || []) @deleted = Array(read_init(init, "deleted") || []) end |
Instance Attribute Details
#changed ⇒ Object (readonly)
Returns the value of attribute changed.
115 116 117 |
# File 'lib/dommy/cookie_store.rb', line 115 def changed @changed end |
#deleted ⇒ Object (readonly)
Returns the value of attribute deleted.
115 116 117 |
# File 'lib/dommy/cookie_store.rb', line 115 def deleted @deleted end |
Instance Method Details
#__js_get__(key) ⇒ Object
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/dommy/cookie_store.rb', line 117 def __js_get__(key) case key when "changed" @changed when "deleted" @deleted else super end end |