Class: Fiona7::TypeRegister::TypeDefinition::Attribute

Inherits:
Struct
  • Object
show all
Defined in:
lib/fiona7/type_register.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



29
30
31
# File 'lib/fiona7/type_register.rb', line 29

def name
  @name
end

#real_nameObject

Returns the value of attribute real_name

Returns:

  • (Object)

    the current value of real_name



29
30
31
# File 'lib/fiona7/type_register.rb', line 29

def real_name
  @real_name
end

#real_typeObject

Returns the value of attribute real_type

Returns:

  • (Object)

    the current value of real_type



29
30
31
# File 'lib/fiona7/type_register.rb', line 29

def real_type
  @real_type
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



29
30
31
# File 'lib/fiona7/type_register.rb', line 29

def type
  @type
end

#valuesObject

Returns the value of attribute values

Returns:

  • (Object)

    the current value of values



29
30
31
# File 'lib/fiona7/type_register.rb', line 29

def values
  @values
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
33
# File 'lib/fiona7/type_register.rb', line 30

def eql?(other)
  other.kind_of?(self.class) &&
    self.name.eql?(other.name)
end

#hashObject



35
36
37
# File 'lib/fiona7/type_register.rb', line 35

def hash
  return self.name.hash
end

#values_setObject



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/fiona7/type_register.rb', line 39

def values_set
  return @values_set if defined?(@values_set)

  if self.values.present?
    @values_set = self.values.to_set
  else
    @values_set = Set[]
  end

  return @values_set
end