Module: Transcriber::Resource::Property::Builder

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

Instance Method Summary collapse

Instance Method Details

#id(*args) ⇒ Object



15
16
17
18
19
# File 'lib/transcriber/resource/key/property/builder.rb', line 15

def id(*args)
  options = options(args)
  name = args.fetch(0, :id)
  property(name, options.merge(id: true))
end

#properties(*args) ⇒ Object



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

def properties(*args)
  options = options(args)
  names = args
  names.each {|name| property(name, options)}
end

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



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

def property(name, options = {})
  key Property.new(name, options)
end