Class: RubyApp::Elements::Calendars::Base::BaseMonth::ChangedEvent
- Inherits:
-
RubyApp::Element::Event
- Object
- RubyApp::Element::Event
- RubyApp::Elements::Calendars::Base::BaseMonth::ChangedEvent
- Defined in:
- lib/ruby_app/elements/calendars/base/base_month.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from RubyApp::Element::Event
Instance Method Summary collapse
-
#initialize(data) ⇒ ChangedEvent
constructor
A new instance of ChangedEvent.
- #to_hash ⇒ Object
Methods inherited from RubyApp::Element::Event
#add_class, #alert, #confirm_refresh, #execute, from_hash, #go, #hide, #process!, #refresh, #remove_class, #set_cookie, #show, #today, #update_element, #update_text, #update_value
Methods included from Mixins::TranslateMixin
Constructor Details
#initialize(data) ⇒ ChangedEvent
Returns a new instance of ChangedEvent.
37 38 39 40 |
# File 'lib/ruby_app/elements/calendars/base/base_month.rb', line 37 def initialize(data) super(data) @value = Date.parse(data['date']) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
35 36 37 |
# File 'lib/ruby_app/elements/calendars/base/base_month.rb', line 35 def value @value end |
Instance Method Details
#to_hash ⇒ Object
42 43 44 |
# File 'lib/ruby_app/elements/calendars/base/base_month.rb', line 42 def to_hash super.merge('value' => @value.strftime) end |