Class: AmCharts::ExportSettings::Menu
- Inherits:
-
Object
- Object
- AmCharts::ExportSettings::Menu
- Includes:
- UsesSettings
- Defined in:
- lib/amcharts/export_settings.rb
Instance Attribute Summary
Attributes included from UsesSettings
Instance Method Summary collapse
- #formats ⇒ Object
-
#initialize ⇒ Menu
constructor
A new instance of Menu.
Constructor Details
#initialize ⇒ Menu
Returns a new instance of Menu.
8 9 10 11 12 13 14 |
# File 'lib/amcharts/export_settings.rb', line 8 def initialize(*) super if defined? Rails @settings.icon ||= ActionController::Base.helpers.asset_path('amcharts/export.png') end end |
Instance Method Details
#formats ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/amcharts/export_settings.rb', line 16 def formats formats = [] formats << @settings[:format].to_s.downcase.to_sym if @settings[:format] if @settings[:items] @settings[:items].each do |i| formats << i[:format].to_s.downcase.to_sym if i[:format] end end formats end |