Sha256: db7a50c757268bf7baba1b483de01f0ca3d0057869b60d2927b2246852980619

Contents?: true

Size: 397 Bytes

Versions: 30

Compression:

Stored size: 397 Bytes

Contents

class RestModel
  class Embeddable
    module Builder
      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

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rest_model-0.1.9 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.8 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.7 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.6 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.5 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.4 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.3 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.2 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.1 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.0 lib/rest_model/key/embeddable/builder.rb