Class: CIM::ReferenceType

Inherits:
Type
  • Object
show all
Defined in:
lib/cim/type.rb

Overview

ReferenceType is a strongly typed reference to a class

Constant Summary

Constants inherited from Type

Type::MATCHES, Type::NORMALIZE, Type::TYPES

Instance Attribute Summary collapse

Attributes inherited from Type

#type

Instance Method Summary collapse

Methods inherited from Type

#==, #array?, #matches?, normalize, #to_sym

Constructor Details

#initialize(name) ⇒ ReferenceType

Creates a strongly typed reference to class name



217
218
219
220
# File 'lib/cim/type.rb', line 217

def initialize name
  @name = name
  super "class"
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



213
214
215
# File 'lib/cim/type.rb', line 213

def name
  @name
end

Instance Method Details

#to_sObject

returns a string representation of the reference type



224
225
226
# File 'lib/cim/type.rb', line 224

def to_s
  "#{@name} ref"
end