Class: Puppet::Pops::Types::PScalarDataType
- Inherits:
-
PScalarType
- Object
- TypedModelObject
- PAnyType
- PScalarType
- Puppet::Pops::Types::PScalarDataType
- Defined in:
- lib/puppet/pops/types/types.rb
Overview
Like Scalar but limited to Json Data.
Direct Known Subclasses
PBooleanType, PEnumType, PNumericType, PPatternType, PStringType
Constant Summary collapse
- DEFAULT =
PScalarDataType.new
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from PScalarType
Methods inherited from PAnyType
#==, #accept, #assignable?, #callable?, #callable_args?, #callable_with?, #check_self_recursion, create, #create, #eql?, #generalize, #hash, #iterable?, #iterable_type, #kind_of_callable?, #loader, #name, #new_function, new_function, #normalize, #really_instance?, #resolve, #roundtrip_with_string?, #simple_name, simple_name, #to_alias_expanded_s, #to_s
Methods inherited from TypedModelObject
_pcore_type, create_ptype, register_ptypes
Methods included from Visitable
Methods included from PuppetObject
#_pcore_all_contents, #_pcore_contents, #_pcore_init_hash, #_pcore_type, #to_s
Class Method Details
.register_ptype(loader, ir) ⇒ Object
735 736 737 |
# File 'lib/puppet/pops/types/types.rb', line 735 def self.register_ptype(loader, ir) create_ptype(loader, ir, 'ScalarType') end |
Instance Method Details
#instance?(o, guard = nil) ⇒ Boolean
739 740 741 |
# File 'lib/puppet/pops/types/types.rb', line 739 def instance?(o, guard = nil) o.instance_of?(String) || o.is_a?(Integer) || o.is_a?(Float) || o.is_a?(TrueClass) || o.is_a?(FalseClass) end |