Module: Ronin::Core::Metadata::ID

Defined in:
lib/ronin/core/metadata/id.rb

Overview

Adds a id metadata attribute to a class.

Example

class MyClass

  include Ronin::Core::Metadata::ID

  id 'my_class'

end

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Adds ClassMethods to the class.

Parameters:



44
45
46
# File 'lib/ronin/core/metadata/id.rb', line 44

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#class_idString?

The id of the class.

Returns:

  • (String, nil)

See Also:



85
86
87
# File 'lib/ronin/core/metadata/id.rb', line 85

def class_id
  self.class.id
end