Sha256: 12713bf1a3068e3f8087dd223d968e9ab756a03bdfdd32733cd6a6d2c2e8b75e

Contents?: true

Size: 506 Bytes

Versions: 6

Compression:

Stored size: 506 Bytes

Contents

require "attentive/entity"

Attentive::Entity.define "core.date.duration.units",
    "day",
    "days",
    "week",
    "wk",
    "weeks",
    "wks",
    "month",
    "mo",
    "months",
    "mos",
    "year",
    "yr",
    "years",
    "yrs",
    published: false do |match|

  case match.phrase
  when "day", "days" then :days
  when "week", "wk", "weeks", "wks" then :weeks
  when "month", "mo", "months", "mos" then :months
  when "year", "yr", "years", "yrs" then :years
  else
    nomatch!
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
attentive-0.3.9 lib/attentive/entities/core/date/duration/units.rb
attentive-0.3.8 lib/attentive/entities/core/date/duration/units.rb
attentive-0.3.7 lib/attentive/entities/core/date/duration/units.rb
attentive-0.3.6 lib/attentive/entities/core/date/duration/units.rb
attentive-0.3.5 lib/attentive/entities/core/date/duration/units.rb
attentive-0.3.4 lib/attentive/entities/core/date/duration/units.rb