Class: Ambling::Data::Pie
Overview
For an amchart pie chart
Instance Attribute Summary collapse
-
#slices ⇒ Object
Returns the value of attribute slices.
Attributes inherited from BaseData
Instance Method Summary collapse
- #build_xml(builder) ⇒ Object
-
#initialize(data = []) ⇒ Pie
constructor
A new instance of Pie.
- #push(item) ⇒ Object (also: #<<)
Methods inherited from Base
Constructor Details
#initialize(data = []) ⇒ Pie
Returns a new instance of Pie.
230 231 232 |
# File 'lib/ambling/data.rb', line 230 def initialize(data = []) self.slices = data end |
Instance Attribute Details
#slices ⇒ Object
Returns the value of attribute slices.
228 229 230 |
# File 'lib/ambling/data.rb', line 228 def slices @slices end |
Instance Method Details
#build_xml(builder) ⇒ Object
249 250 251 252 |
# File 'lib/ambling/data.rb', line 249 def build_xml(builder) @message.build_xml(builder) if !@message.nil? @slices.each {|s| s.build_xml(builder)} end |