Module: Kernel

Defined in:
lib/ruport/util/xls_table.rb,
lib/ruport/util/ods_table.rb,
lib/ruport/util/graph.rb

Instance Method Summary collapse

Instance Method Details

#Graph(x_labels = [], data = []) ⇒ Object



58
59
60
61
# File 'lib/ruport/util/graph.rb', line 58

def Graph(x_labels=[], data=[])
  Ruport::Data::Graph.new(:column_names => x_labels, :data => data,
                          :record_class => Ruport::Data::GraphData )
end

#RuportTableMethodObject

Updates the Ruport interface for creating Data::Tables with the ability to pass in a XLS file or Roo Excel object.

t = Table("myspreadsheet.xls")
t = Table("myspreadsheet.xls", :has_column_names => true)


118
119
120
121
122
123
124
125
126
127
128
# File 'lib/ruport/util/ods_table.rb', line 118

def Table(*args,&block)
  table=
  case(args[0])
  when /\.xls/
    Ruport::Data::Table.load_xls(*args)
  else
    RuportTableMethod2(*args,&block)
  end             
  
  return table
end

#RuportTableMethod2Object



118
# File 'lib/ruport/util/xls_table.rb', line 118

alias :RuportTableMethod2 :Table

#Table(*args, &block) ⇒ Object

Updates the Ruport interface for creating Data::Tables with the ability to pass in a ODS file or Roo Openoffice object.

t = Table("myspreadsheet.ods")
t = Table("myspreadsheet.ods", :has_column_names => true)


125
126
127
128
129
130
131
132
133
134
135
# File 'lib/ruport/util/xls_table.rb', line 125

def Table(*args,&block)
  table=
  case(args[0])
  when /\.xls/
    Ruport::Data::Table.load_xls(*args)
  else
    RuportTableMethod2(*args,&block)
  end             
  
  return table
end