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.3.1 lib/rest_model/key/embeddable/builder.rb
rest_model-0.3.0 lib/rest_model/key/embeddable/builder.rb
rest_model-0.2.3 lib/rest_model/key/embeddable/builder.rb
rest_model-0.2.1 lib/rest_model/key/embeddable/builder.rb
rest_model-0.2.0 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.24 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.23 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.22 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.21 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.20 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.19 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.18 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.17 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.16 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.15 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.14 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.13 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.12 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.11 lib/rest_model/key/embeddable/builder.rb
rest_model-0.1.10 lib/rest_model/key/embeddable/builder.rb