Class: ActsAsDashboard::ShortMessagesWidget
- Defined in:
- lib/acts_as_dashboard/short_messages_widget.rb
Constant Summary collapse
- @@default_max_data_items =
5
Instance Attribute Summary collapse
-
#max_data_items ⇒ Object
Returns the value of attribute max_data_items.
Attributes inherited from Widget
#block, #name, #title, #type, #update_interval
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(options = {}) ⇒ ShortMessagesWidget
constructor
A new instance of ShortMessagesWidget.
Methods inherited from Widget
Constructor Details
#initialize(options = {}) ⇒ ShortMessagesWidget
Returns a new instance of ShortMessagesWidget.
7 8 9 10 11 12 13 14 |
# File 'lib/acts_as_dashboard/short_messages_widget.rb', line 7 def initialize( = {}) .delete :type self.type = :short_messages self.max_data_items = [:max_data_items] || @@default_max_data_items super end |
Instance Attribute Details
#max_data_items ⇒ Object
Returns the value of attribute max_data_items.
5 6 7 |
# File 'lib/acts_as_dashboard/short_messages_widget.rb', line 5 def max_data_items @max_data_items end |
Instance Method Details
#attributes ⇒ Object
21 22 23 |
# File 'lib/acts_as_dashboard/short_messages_widget.rb', line 21 def attributes super.merge(:max_data_items => @max_data_items) end |