Class: ConvenientService::Utils::Class::DisplayName

Inherits:
Support::Command show all
Defined in:
lib/convenient_service/utils/class/display_name.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Support::Command

[], call

Constructor Details

#initialize(klass) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:



35
36
37
# File 'lib/convenient_service/utils/class/display_name.rb', line 35

def initialize(klass)
  @klass = klass
end

Instance Attribute Details

#klassObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
# File 'lib/convenient_service/utils/class/display_name.rb', line 27

def klass
  @klass
end

Instance Method Details

#callString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



48
49
50
# File 'lib/convenient_service/utils/class/display_name.rb', line 48

def call
  klass.name || "AnonymousClass(##{klass.object_id})"
end