Class: RubyApp::Elements::Mobile::Calendars::Month
- Inherits:
-
RubyApp::Element
- Object
- RubyApp::Element
- RubyApp::Elements::Mobile::Calendars::Month
- Defined in:
- lib/ruby_app/elements/mobile/calendars/month.rb
Defined Under Namespace
Classes: ChangedEvent
Instance Attribute Summary collapse
-
#display ⇒ Object
Returns the value of attribute display.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from RubyApp::Element
Instance Method Summary collapse
-
#initialize(today = Date.today, value = Date.today) ⇒ Month
constructor
A new instance of Month.
- #move_next!(event) ⇒ Object
- #move_previous!(event) ⇒ Object
Methods inherited from RubyApp::Element
Methods included from Mixins::ConfigurationMixin
Methods included from Mixins::TranslateMixin
Methods included from Mixins::TemplateMixin
#exclude_parent_template, #exclude_parent_template?, #get_cache, #get_default_template, #get_template, #get_template_name, #get_templates, #template_path
Methods included from Mixins::RenderMixin
#content_for, #get_cache, #get_default_template, #get_templates, #render
Constructor Details
#initialize(today = Date.today, value = Date.today) ⇒ Month
Returns a new instance of Month.
40 41 42 43 44 45 |
# File 'lib/ruby_app/elements/mobile/calendars/month.rb', line 40 def initialize(today = Date.today, value = Date.today) super() @today = today @value = value @display = @value end |
Instance Attribute Details
#display ⇒ Object
Returns the value of attribute display.
36 37 38 |
# File 'lib/ruby_app/elements/mobile/calendars/month.rb', line 36 def display @display end |
#value ⇒ Object
Returns the value of attribute value.
35 36 37 |
# File 'lib/ruby_app/elements/mobile/calendars/month.rb', line 35 def value @value end |
Instance Method Details
#move_next!(event) ⇒ Object
52 53 54 55 |
# File 'lib/ruby_app/elements/mobile/calendars/month.rb', line 52 def move_next!(event) @display = @display >> 1 event.update_element(self) end |
#move_previous!(event) ⇒ Object
47 48 49 50 |
# File 'lib/ruby_app/elements/mobile/calendars/month.rb', line 47 def move_previous!(event) @display = @display << 1 event.update_element(self) end |