module Puppet::Pops::Types::PCallableType::ClassModule

Public Instance Methods

==(o) click to toggle source
# File lib/puppet/pops/types/types.rb, line 323
def ==(o)
  self.class == o.class && args_type == o.args_type && block_type == o.block_type
end
block_range() click to toggle source

Range [0,0], [0,1], or [1,1] for the block

# File lib/puppet/pops/types/types.rb, line 308
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() click to toggle source
# File lib/puppet/pops/types/types.rb, line 319
def hash
  [self.class, Set.new(param_types), block_type].hash
end
last_range() click to toggle source

Returns the number of accepted arguments for the last parameter type [min, max]

# File lib/puppet/pops/types/types.rb, line 302
def last_range
  param_types.repeat_last_range
end
size_range() click to toggle source

Returns the number of accepted arguments [min, max]

# File lib/puppet/pops/types/types.rb, line 296
def size_range
  param_types.size_range
end