Module: Puppet::Pops::Types::PCollectionType::ClassModule
- Defined in:
- lib/puppet/pops/types/types.rb
Instance Method Summary collapse
- #==(o) ⇒ Object
- #hash ⇒ Object
-
#size_range ⇒ Object
Returns an array with from (min) size to (max) size.
Instance Method Details
#==(o) ⇒ Object
226 227 228 |
# File 'lib/puppet/pops/types/types.rb', line 226 def ==(o) self.class == o.class && element_type == o.element_type && size_type == o.size_type end |
#hash ⇒ Object
222 223 224 |
# File 'lib/puppet/pops/types/types.rb', line 222 def hash [self.class, element_type, size_type].hash end |
#size_range ⇒ Object
Returns an array with from (min) size to (max) size
211 212 213 214 215 216 217 218 219 220 |
# File 'lib/puppet/pops/types/types.rb', line 211 def size_range return [0, INFINITY] if size_type.nil? f = size_type.from || 0 t = size_type.to || INFINITY if f < t [f, t] else [t,f] end end |