Class: OldSql::ReportDesign::Chart

Inherits:
Object
  • Object
show all
Defined in:
lib/old_sql/report_design/chart.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value = []) ⇒ Chart

Returns a new instance of Chart.



6
7
8
# File 'lib/old_sql/report_design/chart.rb', line 6

def initialize(value = [])
  @items = value
end

Instance Attribute Details

#itemsObject

Returns the value of attribute items.



4
5
6
# File 'lib/old_sql/report_design/chart.rb', line 4

def items
  @items
end

#type(new_type = nil) ⇒ Object

Returns the value of attribute type.



4
5
6
# File 'lib/old_sql/report_design/chart.rb', line 4

def type
  @type
end

Instance Method Details

#add(slice) ⇒ Object



15
16
17
# File 'lib/old_sql/report_design/chart.rb', line 15

def add(slice)
  @items << ChartItem.new(slice)
end

#item(index) ⇒ Object



19
20
21
# File 'lib/old_sql/report_design/chart.rb', line 19

def item(index)
  @items[index]
end