Class: Puppet::Pops::Types::PRegexpType
Constant Summary
collapse
- DEFAULT =
PRegexpType.new(nil)
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from PScalarType
#instance?
Methods inherited from PAnyType
#assignable?, #callable?, #callable_args?, #enumerable?, #generalize, #instance?, #kind_of_callable?, #simple_name, #to_s
Methods included from Visitable
#accept
Constructor Details
#initialize(pattern) ⇒ PRegexpType
Returns a new instance of PRegexpType.
696
697
698
|
# File 'lib/puppet/pops/types/types.rb', line 696
def initialize(pattern)
@pattern = pattern
end
|
Instance Attribute Details
694
695
696
|
# File 'lib/puppet/pops/types/types.rb', line 694
def pattern
@pattern
end
|
Instance Method Details
708
709
710
|
# File 'lib/puppet/pops/types/types.rb', line 708
def ==(o)
self.class == o.class && @pattern == o.pattern
end
|
704
705
706
|
# File 'lib/puppet/pops/types/types.rb', line 704
def hash
@pattern.hash
end
|
700
701
702
|
# File 'lib/puppet/pops/types/types.rb', line 700
def regexp
@regexp ||= Regexp.new(@pattern || '')
end
|