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:



30
31
32
# File 'lib/convenient_service/utils/class/display_name.rb', line 30

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.



22
23
24
# File 'lib/convenient_service/utils/class/display_name.rb', line 22

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:



43
44
45
# File 'lib/convenient_service/utils/class/display_name.rb', line 43

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