Class: Puppet::Pops::Types::PPatternType
- Inherits:
-
PScalarType
- Object
- TypedModelObject
- PAnyType
- PScalarType
- Puppet::Pops::Types::PPatternType
- Defined in:
- lib/puppet/pops/types/types.rb
Overview
Represents a subtype of String that narrows the string to those matching the patterns If specified without a pattern it is basically the same as the String type.
Constant Summary collapse
- DEFAULT =
PPatternType.new([])
Instance Attribute Summary collapse
- #patterns ⇒ Object readonly
Instance Method Summary collapse
- #==(o) ⇒ Object
- #hash ⇒ Object
-
#initialize(patterns) ⇒ PPatternType
constructor
A new instance of PPatternType.
Methods inherited from PScalarType
Methods inherited from PAnyType
#assignable?, #callable?, #callable_args?, #enumerable?, #generalize, #instance?, #kind_of_callable?, #simple_name, #to_s
Methods included from Visitable
Constructor Details
#initialize(patterns) ⇒ PPatternType
Returns a new instance of PPatternType.
731 732 733 |
# File 'lib/puppet/pops/types/types.rb', line 731 def initialize(patterns) @patterns = patterns.freeze end |
Instance Attribute Details
#patterns ⇒ Object (readonly)
729 730 731 |
# File 'lib/puppet/pops/types/types.rb', line 729 def patterns @patterns end |