Sha256: e729079dd5c40d16c124ec88d6ef17ce9290269379df783c0d9e19d4c2456b79

Contents?: true

Size: 536 Bytes

Versions: 4

Compression:

Stored size: 536 Bytes

Contents

class WorksReportFilter < ReportFilter
  attr_reader :invoice
  attr_reader :user_id
  
  def initialize(attributes)
    @invoice = nil
    @user_id = nil

    if attributes
      attributes = attributes.clone
      
      invoice_param = attributes.delete(:invoice)
      @invoice = invoice_param == 'true' if invoice_param && invoice_param.size > 0
      
      user_id_param = attributes.delete(:user_id)
      @user_id = user_id_param.to_i if user_id_param && user_id_param.size > 0
      
    end
    super(attributes)
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
backlog-0.29.0 app/models/works_report_filter.rb
backlog-0.30.0 app/models/works_report_filter.rb
backlog-0.31.0 app/models/works_report_filter.rb
backlog-0.31.1 app/models/works_report_filter.rb