Class: Bound
- Inherits:
-
Object
show all
- Defined in:
- lib/bound.rb,
lib/bound/version.rb
Defined Under Namespace
Classes: BoundClass, HashSeeder, ObjectSeeder
Constant Summary
collapse
- VERSION =
"0.1.5"
Class Method Summary
collapse
Class Method Details
.nested(*args) ⇒ Object
8
9
10
|
# File 'lib/bound.rb', line 8
def self.nested(*args)
new_bound_class.nested(*args)
end
|
.new(*args) ⇒ Object
4
5
6
|
# File 'lib/bound.rb', line 4
def self.new(*args)
new_bound_class.set_attributes(*args)
end
|
.optional(*args) ⇒ Object
12
13
14
|
# File 'lib/bound.rb', line 12
def self.optional(*args)
new_bound_class.optional(*args)
end
|
.required(*args) ⇒ Object
16
17
18
19
20
21
22
23
24
|
# File 'lib/bound.rb', line 16
def self.required(*args)
bound = new_bound_class
if args.last.kind_of? Hash
bound.nested(args.pop)
end
bound.set_attributes(*args)
end
|