Sha256: 7cf8878bb2a9b5481a74694dccc12f3add84b79c03de56b81a7cdb2cd3d7c459

Contents?: true

Size: 450 Bytes

Versions: 12

Compression:

Stored size: 450 Bytes

Contents

module Transcriber
  class Resource
    module Builder
      module Embeddables
        def embeds(name, options)
          key Embeddable.new(name, options)
        end

        def embeds_one(name, options = {})
          options.merge!(many: false)
          embeds(name, options)
        end

        def embeds_many(name, options = {})
          options.merge!(many: true)
          embeds(name, options)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
transcriber-0.0.13 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.12 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.11 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.10 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.9 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.8 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.7 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.6 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.5 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.4 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.3 lib/transcriber/resource/builder/embeddables.rb
transcriber-0.0.2 lib/transcriber/resource/builder/embeddables.rb