Changeset 1283
- Timestamp:
- 03/06/08 15:42:19 (9 months ago)
- Files:
-
- ruport/trunk/lib/ruport/data/record.rb (modified) (1 diff)
- ruport/trunk/lib/ruport/formatter/csv.rb (modified) (1 diff)
- ruport/trunk/lib/ruport/renderer.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ruport/trunk/lib/ruport/data/record.rb
r1214 r1283 19 19 class Record 20 20 21 private :id 21 if RUBY_VERSION < "1.9" 22 private :id 23 end 22 24 23 25 include Enumerable ruport/trunk/lib/ruport/formatter/csv.rb
r1281 r1283 31 31 # 32 32 class Formatter::CSV < Formatter 33 34 if RUBY_VERSION > "1.9" 35 require "csv" 36 FCSV = CSV 37 alias_method :FCSV, :CSV 38 end 33 39 34 40 renders :csv, :for => [ Renderer::Row, Renderer::Table, 35 41 Renderer::Group, Renderer::Grouping ] 42 43 def initialize 44 require "fastercsv" unless RUBY_VERSION > "1.9" 45 end 36 46 37 47 attr_writer :csv_writer 38 39 def initialize40 require 'fastercsv'41 end42 48 43 49 # Hook for setting available options using a template. See the template ruport/trunk/lib/ruport/renderer.rb
r1262 r1283 27 27 # Simplified version of HashWithIndifferentAccess 28 28 class Options < OpenStruct 29 30 private :id 29 30 if RUBY_VERSION < "1.9" 31 private :id 32 end 31 33 32 34 # Returns a Hash object. Use this if you need methods other than []
