Sha256: 5103dc9e717ad6abf62ab9833e7b123ce033bbaef37a38aff04f3b7d302d9ee9

Contents?: true

Size: 433 Bytes

Versions: 16

Compression:

Stored size: 433 Bytes

Contents

module Formstrap
  class DatetimeRangeView < ViewModel
    def start_options
      default_start_options.deep_merge(@start || {})
    end

    def end_options
      default_end_options.deep_merge(@end || {})
    end

    private

    def default_start_options
      keys = attributes - %i[start]
      to_h.slice(*keys)
    end

    def default_end_options
      keys = attributes - %i[end]
      to_h.slice(*keys)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
formstrap-0.4.5 app/models/formstrap/datetime_range_view.rb
formstrap-0.4.4 app/models/formstrap/datetime_range_view.rb
formstrap-0.4.3 app/models/formstrap/datetime_range_view.rb
formstrap-0.4.2 app/models/formstrap/datetime_range_view.rb
formstrap-0.3.5 app/models/formstrap/datetime_range_view.rb
formstrap-0.3.4 app/models/formstrap/datetime_range_view.rb
formstrap-0.3.3 app/models/formstrap/datetime_range_view.rb
formstrap-0.3.2 app/models/formstrap/datetime_range_view.rb
formstrap-0.3.1 app/models/formstrap/datetime_range_view.rb
formstrap-0.3.0 app/models/formstrap/datetime_range_view.rb
formstrap-0.2.1 app/models/formstrap/datetime_range_view.rb
formstrap-0.2.0 app/models/formstrap/datetime_range_view.rb
formstrap-0.1.3 app/models/formstrap/datetime_range_view.rb
formstrap-0.1.2 app/models/formstrap/datetime_range_view.rb
formstrap-0.1.1 app/models/formstrap/datetime_range_view.rb
formstrap-0.1.0 app/models/formstrap/datetime_range_view.rb