Class: AmCharts::Legend

Inherits:
Object
  • Object
show all
Defined in:
lib/amcharts/legend.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Legend

Returns a new instance of Legend.



5
6
7
8
9
# File 'lib/amcharts/legend.rb', line 5

def initialize(&block)
  @settings = Settings.new
  @listeners = Collection[Listener]
  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)



13
14
15
# File 'lib/amcharts/legend.rb', line 13

def method_missing(name, *args, &block)
  @settings.send(name, *args, &block)
end

Instance Attribute Details

#listenersObject (readonly)

Returns the value of attribute listeners.



3
4
5
# File 'lib/amcharts/legend.rb', line 3

def listeners
  @listeners
end

#settingsObject (readonly)

Returns the value of attribute settings.



3
4
5
# File 'lib/amcharts/legend.rb', line 3

def settings
  @settings
end