Module: RestModel::Property::Builder
- Included in:
- Key::Builder
- Defined in:
- lib/rest_model/key/property/builder.rb
Instance Method Summary collapse
Instance Method Details
#id(*args) ⇒ Object
15 16 17 18 19 |
# File 'lib/rest_model/key/property/builder.rb', line 15 def id(*args) = (args) name = args.fetch(0, :id) property(name, .merge(id: true)) end |
#properties(*args) ⇒ Object
9 10 11 12 13 |
# File 'lib/rest_model/key/property/builder.rb', line 9 def properties(*args) = (args) names = args names.each {|name| property(name, )} end |
#property(name, options = {}) ⇒ Object
4 5 6 7 |
# File 'lib/rest_model/key/property/builder.rb', line 4 def property(name, = {}) [:validate] = ![:validate_if_present] key Property.new(name, ) end |