Sha256: 0a861114f413e69b46eb0017317fac8ff89a8aeee8ff5134f72b81206e2dd1ff

Contents?: true

Size: 458 Bytes

Versions: 6

Compression:

Stored size: 458 Bytes

Contents

require "attentive/entity"

Attentive::Entity.define "core.time.duration.units",
    "second",
    "seconds",
    "s",
    "minute",
    "minutes",
    "min",
    "m",
    "hour",
    "hours",
    "hr",
    "hrs",
    "h",
    published: false do |match|

  case match.phrase
  when "second", "seconds", "s" then :seconds
  when "minute", "minutes", "min", "m" then :minutes
  when "hour", "hours", "hr", "hrs", "h" then :hours
  else
    nomatch!
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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