Module: Transcriber::Resource::Embeddable::Builder

Included in:
Builder
Defined in:
lib/transcriber/resource/key/embeddable/builder.rb

Instance Method Summary collapse

Instance Method Details

#embeds(name, options = {}) ⇒ Object



5
6
7
# File 'lib/transcriber/resource/key/embeddable/builder.rb', line 5

def embeds(name, options = {})
  key Embeddable.new(name, options)
end

#embeds_many(name, options = {}) ⇒ Object



14
15
16
17
# File 'lib/transcriber/resource/key/embeddable/builder.rb', line 14

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

#embeds_one(name, options = {}) ⇒ Object



9
10
11
12
# File 'lib/transcriber/resource/key/embeddable/builder.rb', line 9

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