Sha256: c6ba8c99f2637d9015575e69afa26826e3eb2ce8e33690c79f88b21aa1a46a75

Contents?: true

Size: 368 Bytes

Versions: 11

Compression:

Stored size: 368 Bytes

Contents

class TimePeriod
  include Mongoid::Document
  include Mongoid::Timespanned

  field :dates,     :type => ::Timespan, :between => true
  field :flex,      :type => ::DurationRange

  embedded_in :account

  timespan_methods :dates

  # override defaults
  max_asap 14.days.from_now
  min_asap 2.days.ago

  asap_method :period
  duration_methods 'time_period.flex'
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
timespan-0.6.0 spec/timespan/mongoid/models/time_period.rb
timespan-0.5.9 spec/timespan/mongoid/models/time_period.rb
timespan-0.5.7 spec/timespan/mongoid/models/time_period.rb
timespan-0.5.6.1 spec/timespan/mongoid/models/time_period.rb
timespan-0.5.6 spec/timespan/mongoid/models/time_period.rb
timespan-0.5.5 spec/timespan/mongoid/models/time_period.rb
timespan-0.5.4 spec/timespan/mongoid/models/time_period.rb
timespan-0.5.3 spec/timespan/mongoid/models/time_period.rb
timespan-0.5.2 spec/timespan/mongoid/models/time_period.rb
timespan-0.5.1 spec/timespan/mongoid/models/time_period.rb
timespan-0.5.0 spec/timespan/mongoid/models/time_period.rb