Sha256: 6814ccf75d36027f68b9df7406ef31e55f7008ade82be1f1ff36ed616fd25409

Contents?: true

Size: 315 Bytes

Versions: 6

Compression:

Stored size: 315 Bytes

Contents

class FestivityDatetimeFilterPresenter

  def self.new(datetimes, datetime_type)
    datetimes.map { |datetime| datetime_type_class(datetime_type).new(datetime) }

  end

  private

  def self.datetime_type_class(datetime_type)
   datetime_type == "date" ? FestivityDatePresenter : FestivityTimePresenter
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trusty-festivity-extension-2.2.5 app/presenters/festivity_datetime_filter_presenter.rb
trusty-festivity-extension-2.2.4 app/presenters/festivity_datetime_filter_presenter.rb
trusty-festivity-extension-2.2.3 app/presenters/festivity_datetime_filter_presenter.rb
trusty-festivity-extension-2.2.2 app/presenters/festivity_datetime_filter_presenter.rb
trusty-festivity-extension-2.2.1 app/presenters/festivity_datetime_filter_presenter.rb
trusty-festivity-extension-2.2.0 app/presenters/festivity_datetime_filter_presenter.rb