Class: Bound
- Inherits:
-
Object
show all
- Defined in:
- lib/bound.rb,
lib/bound/caller.rb,
lib/bound/version.rb
Defined Under Namespace
Classes: BoundValidator, ManualCaller, PublicSendCaller, StaticBoundClass
Constant Summary
collapse
- Caller =
ManualCaller
- VERSION =
"2.2.0"
Class Method Summary
collapse
Class Method Details
.disable_validation ⇒ Object
22
23
24
25
|
# File 'lib/bound.rb', line 22
def self.disable_validation
@validation_disabled = true
StaticBoundClass.define_initializer_without_validation
end
|
.new(*args) ⇒ Object
6
7
8
|
# File 'lib/bound.rb', line 6
def self.new(*args)
new_bound_class.required(*args)
end
|
.optional(*args) ⇒ Object
10
11
12
|
# File 'lib/bound.rb', line 10
def self.optional(*args)
new_bound_class.optional(*args)
end
|
.required(*args) ⇒ Object
14
15
16
|
# File 'lib/bound.rb', line 14
def self.required(*args)
new_bound_class.required(*args)
end
|
.validate? ⇒ Boolean
18
19
20
|
# File 'lib/bound.rb', line 18
def self.validate?
!@validation_disabled
end
|