Class: DevSuite::Utils::Construct::Component::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/dev_suite/utils/construct/component/base.rb

Class Method Summary collapse

Class Method Details

.component_keyObject

Returns the key for the class. If the COMPONENT_KEY constant is defined, it returns its value. Otherwise, it generates a key based on the class name.



11
12
13
14
15
# File 'lib/dev_suite/utils/construct/component/base.rb', line 11

def component_key
  return const_get(:COMPONENT_KEY) if const_defined?(:COMPONENT_KEY)

  generate_key_from_class_name
end