Sha256: fe0bc53475fd2d88b5ec3d6d6b3c6c96740ff25522a5e50325d42b8ee42bfd89

Contents?: true

Size: 386 Bytes

Versions: 1

Compression:

Stored size: 386 Bytes

Contents

class Transcriber::Resource
  module Embeddables
    def embeds(name, options)
      attr_accessor name
      keys << 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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
transcriber-0.0.1 lib/transcriber/resource/embeddables.rb