Class: AmCharts::ExportSettings
- Inherits:
-
Object
- Object
- AmCharts::ExportSettings
- Defined in:
- lib/amcharts/export_settings.rb
Defined Under Namespace
Classes: Menu
Instance Attribute Summary collapse
-
#menus ⇒ Object
readonly
Returns the value of attribute menus.
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(&block) ⇒ ExportSettings
constructor
A new instance of ExportSettings.
- #pdf? ⇒ Boolean
Constructor Details
#initialize(&block) ⇒ ExportSettings
Returns a new instance of ExportSettings.
32 33 34 35 36 |
# File 'lib/amcharts/export_settings.rb', line 32 def initialize(&block) @settings = Settings.new @menus = Collection[Menu] instance_exec(self, &block) if block_given? end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object (private)
49 50 51 |
# File 'lib/amcharts/export_settings.rb', line 49 def method_missing(name, *args, &block) @settings.send(name, *args, &block) end |
Instance Attribute Details
#menus ⇒ Object (readonly)
Returns the value of attribute menus.
30 31 32 |
# File 'lib/amcharts/export_settings.rb', line 30 def @menus end |
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
30 31 32 |
# File 'lib/amcharts/export_settings.rb', line 30 def settings @settings end |
Instance Method Details
#empty? ⇒ Boolean
43 44 45 |
# File 'lib/amcharts/export_settings.rb', line 43 def empty? settings.empty? and .empty? end |
#pdf? ⇒ Boolean
38 39 40 41 |
# File 'lib/amcharts/export_settings.rb', line 38 def pdf? return false if .empty? .flat_map(&:formats).any?{ |f| f == :pdf } end |