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
317 318 319 |
# File 'lib/puppet/pops/types/types.rb', line 317 def ==(o) self.class == o.class && args_type == o.args_type && block_type == o.block_type end |
#block_range ⇒ Object
Range [0,0], [0,1], or [1,1] for the block
302 303 304 305 306 307 308 309 310 311 |
# File 'lib/puppet/pops/types/types.rb', line 302 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
313 314 315 |
# File 'lib/puppet/pops/types/types.rb', line 313 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]
296 297 298 |
# File 'lib/puppet/pops/types/types.rb', line 296 def last_range param_types.repeat_last_range end |
#size_range ⇒ Object
Returns the number of accepted arguments [min, max]
290 291 292 |
# File 'lib/puppet/pops/types/types.rb', line 290 def size_range param_types.size_range end |