Sha256: 729f536aa6ac5a6ac20a09076f3b48f364cf08a922779d8b3dea48cd31959ef5

Contents?: true

Size: 344 Bytes

Versions: 5

Compression:

Stored size: 344 Bytes

Contents

module HentryConsumer
  class FormatRules
    REQUIRED      = []
    UNIQUE = [:uid, :bookmark]
    class << self
      def required?(format)
        REQUIRED.include? format
      end
      def can_have_many?(format)
        !unique?(format)
      end
      
      def unique?(format)
        UNIQUE.include? format
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hentry_consumer-0.4.0 lib/hentry_consumer/format_rules.rb
hentry_consumer-0.3.2 lib/hentry_consumer/format_rules.rb
hentry_consumer-0.3.1 lib/hentry_consumer/format_rules.rb
hentry_consumer-0.3.0 lib/hentry_consumer/format_rules.rb
hentry_consumer-0.2.0 lib/hentry_consumer/format_rules.rb