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.0.1"
Class Method Summary
collapse
Class Method Details
.disable_validation ⇒ Object
21
22
23
24
|
# File 'lib/bound.rb', line 21
def self.disable_validation
@validation_disabled = true
StaticBoundClass.define_initializer_without_validation
end
|
.new(*args) ⇒ Object
5
6
7
|
# File 'lib/bound.rb', line 5
def self.new(*args)
new_bound_class.required(*args)
end
|
.optional(*args) ⇒ Object
9
10
11
|
# File 'lib/bound.rb', line 9
def self.optional(*args)
new_bound_class.optional(*args)
end
|
.required(*args) ⇒ Object
13
14
15
|
# File 'lib/bound.rb', line 13
def self.required(*args)
new_bound_class.required(*args)
end
|
.validate? ⇒ Boolean
17
18
19
|
# File 'lib/bound.rb', line 17
def self.validate?
!@validation_disabled
end
|