Module: Mongoo::Embedded::DescribeDsl

Included in:
DescribeDsl
Defined in:
lib/mongoo/embedded/describe_dsl.rb

Instance Method Summary collapse

Instance Method Details

#embeds_many(attrib_key, opts) ⇒ Object

Raises:

  • (ArgumentError)


9
10
11
12
# File 'lib/mongoo/embedded/describe_dsl.rb', line 9

def embeds_many(attrib_key, opts)
  raise(ArgumentError, "missing opt :class") unless opts[:class]
  define_embeds_many_method(attrib_key, opts)
end

#embeds_one(attrib_key, opts) ⇒ Object

Raises:

  • (ArgumentError)


4
5
6
7
# File 'lib/mongoo/embedded/describe_dsl.rb', line 4

def embeds_one(attrib_key, opts)
  raise(ArgumentError, "missing opt :class") unless opts[:class]
  define_embeds_one_method(attrib_key, opts)
end