aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/neptune_export.rb
blob: 4d8aff76d743752f303b6ee1f64af80795966445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class NeptuneExport < Export

  option :start_date
  option :end_date
  
  def export_options
    start_date ||= ""
    end_date ||= ""
    if (start_date.empty? && end_date.empty?)
       super.merge(:format => :neptune).except(:start_date).except(:end_date)
    elsif start_date.empty?
       super.merge(:format => :neptune, :end_date => end_date).except(:start_date)
    elsif end_date.empty?
       super.merge(:format => :neptune, :start_date => start_date).except(:end_date)
    else  
       super.merge(:format => :neptune, :start_date => start_date, :end_date => end_date)
    end
  end

end