Class: Dhall::Util::ArrayOf
- Inherits:
-
ValueSemantics::ArrayOf
- Object
- ValueSemantics::ArrayOf
- Dhall::Util::ArrayOf
- Defined in:
- lib/dhall/util.rb
Instance Method Summary collapse
- #===(other) ⇒ Object
-
#initialize(element_validator, min: 0, max: Float::INFINITY) ⇒ ArrayOf
constructor
A new instance of ArrayOf.
Constructor Details
#initialize(element_validator, min: 0, max: Float::INFINITY) ⇒ ArrayOf
Returns a new instance of ArrayOf.
36 37 38 39 40 |
# File 'lib/dhall/util.rb', line 36 def initialize(element_validator, min: 0, max: Float::INFINITY) @min = min @max = max super(element_validator) end |
Instance Method Details
#===(other) ⇒ Object
42 43 44 |
# File 'lib/dhall/util.rb', line 42 def ===(other) super && other.length >= @min && other.length <= @max end |