Changeset 385
- Timestamp:
- 12/22/06 00:00:43 (2 years ago)
- Files:
-
- trunk/lib/ruport/report.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/ruport/report.rb
r378 r385 140 140 options[:binding] ||= binding 141 141 q = options[:query_obj] || Query.new(sql, options) 142 if options[:yield_type].eql?(:by_row)142 if block_given? 143 143 q.each { |r| yield(r) } 144 144 elsif options[:as] 145 145 q.result.as(options[:as]) 146 146 else 147 block_given? ? yield(q.result) :q.result147 q.result 148 148 end 149 149 end
