Class: Archimate::DataModel::Comparison::ClassMethods::AttributeInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/archimate/data_model/comparison.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#also_referenceObject

Returns the value of attribute also_reference

Returns:

  • (Object)

    the current value of also_reference



94
95
96
# File 'lib/archimate/data_model/comparison.rb', line 94

def also_reference
  @also_reference
end

#comparison_attrObject

Returns the value of attribute comparison_attr

Returns:

  • (Object)

    the current value of comparison_attr



94
95
96
# File 'lib/archimate/data_model/comparison.rb', line 94

def comparison_attr
  @comparison_attr
end

#defaultObject

Returns the value of attribute default

Returns:

  • (Object)

    the current value of default



94
95
96
# File 'lib/archimate/data_model/comparison.rb', line 94

def default
  @default
end

#referenceable_listObject

Returns the value of attribute referenceable_list

Returns:

  • (Object)

    the current value of referenceable_list



94
95
96
# File 'lib/archimate/data_model/comparison.rb', line 94

def referenceable_list
  @referenceable_list
end

#writableObject

Returns the value of attribute writable

Returns:

  • (Object)

    the current value of writable



94
95
96
# File 'lib/archimate/data_model/comparison.rb', line 94

def writable
  @writable
end

Instance Method Details

#attr_inspect(obj, sym) ⇒ Object



95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/archimate/data_model/comparison.rb', line 95

def attr_inspect(obj, sym)
  case comparison_attr
  when :no_compare
    nil
  when nil
    "#{sym}: #{obj.send(sym).inspect}"
  else
    val = obj.send(sym)
    cval = val&.send(comparison_attr)
    "#{sym}: #<#{val.class.to_s.split('::').last} #{comparison_attr}=#{cval.inspect}>"
  end
end