Class: OldSql::ReportDesign::ChartItem
- Inherits:
-
Object
- Object
- OldSql::ReportDesign::ChartItem
- Defined in:
- lib/old_sql/report_design/chart_item.rb
Instance Attribute Summary collapse
-
#chart_data ⇒ Object
Returns the value of attribute chart_data.
-
#key ⇒ Object
Returns the value of attribute key.
Instance Method Summary collapse
- #expression? ⇒ Boolean
-
#initialize(slice) ⇒ ChartItem
constructor
A new instance of ChartItem.
Constructor Details
#initialize(slice) ⇒ ChartItem
Returns a new instance of ChartItem.
6 7 8 9 10 11 12 |
# File 'lib/old_sql/report_design/chart_item.rb', line 6 def initialize(slice) @key = slice['title'] @data = slice['data'] @chart_data = [] @data.split(" ").each {|chart_data| @chart_data << ChartData.new(chart_data)} end |
Instance Attribute Details
#chart_data ⇒ Object
Returns the value of attribute chart_data.
4 5 6 |
# File 'lib/old_sql/report_design/chart_item.rb', line 4 def chart_data @chart_data end |
#key ⇒ Object
Returns the value of attribute key.
4 5 6 |
# File 'lib/old_sql/report_design/chart_item.rb', line 4 def key @key end |
Instance Method Details
#expression? ⇒ Boolean
14 15 16 17 18 19 20 |
# File 'lib/old_sql/report_design/chart_item.rb', line 14 def expression? if @chart_data.count>1 return true else return false end end |