Class: Ree::Contracts::ArgContracts::Nilor
- Defined in:
- lib/ree/contracts/arg_contracts/nilor.rb
Instance Attribute Summary
Attributes inherited from Or
Instance Method Summary collapse
-
#initialize ⇒ Nilor
constructor
A new instance of Nilor.
- #to_s ⇒ Object
Methods inherited from Or
Methods included from Squarable
Methods included from Truncatable
Constructor Details
#initialize ⇒ Nilor
Returns a new instance of Nilor.
6 7 8 9 |
# File 'lib/ree/contracts/arg_contracts/nilor.rb', line 6 def initialize(*) super validators << Validators.fetch_for(nil) end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/ree/contracts/arg_contracts/nilor.rb', line 11 def to_s "Nilor[#{validators[0..-2].map(&:to_s).join(', ')}]" end |