Module: Puppet::Pops::Types::PCallableType::ClassModule
- Defined in:
- lib/puppet/pops/types/types.rb
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#block_range ⇒ Object
Range [0,0], [0,1], or [1,1] for the block.
- #hash ⇒ Object
-
#last_range ⇒ Object
Returns the number of accepted arguments for the last parameter type [min, max].
-
#size_range ⇒ Object
Returns the number of accepted arguments [min, max].
Instance Method Details
#==(o) ⇒ Object
332 333 334 |
# File 'lib/puppet/pops/types/types.rb', line 332 def ==(o) self.class == o.class && param_types == o.param_types && block_type == o.block_type end |
#block_range ⇒ Object
Range [0,0], [0,1], or [1,1] for the block
317 318 319 320 321 322 323 324 325 326 |
# File 'lib/puppet/pops/types/types.rb', line 317 def block_range case block_type when Puppet::Pops::Types::POptionalType [0,1] when Puppet::Pops::Types::PVariantType, Puppet::Pops::Types::PCallableType [1,1] else [0,0] end end |
#hash ⇒ Object
328 329 330 |
# File 'lib/puppet/pops/types/types.rb', line 328 def hash [self.class, Set.new(param_types), block_type].hash end |
#last_range ⇒ Object
Returns the number of accepted arguments for the last parameter type [min, max]
311 312 313 |
# File 'lib/puppet/pops/types/types.rb', line 311 def last_range param_types.repeat_last_range end |
#size_range ⇒ Object
Returns the number of accepted arguments [min, max]
305 306 307 |
# File 'lib/puppet/pops/types/types.rb', line 305 def size_range param_types.size_range end |