Module: Ronin::Core::Metadata::Summary::ClassMethods

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

Overview

Class-methods.

Instance Method Summary collapse

Instance Method Details

#summary(new_summary = nil) ⇒ String?

Gets or sets the summary.

Examples:

Setting the summary:

summary "Lorem ipsum dolor sit amet, consectetur adipiscing elit"

Getting the summary:

MyModule.summary

Parameters:

  • new_summary (String, nil) (defaults to: nil)

    The optional new summary text to set.

Returns:

  • (String, nil)

    The previously set summary text.



68
69
70
71
72
73
74
75
76
# File 'lib/ronin/core/metadata/summary.rb', line 68

def summary(new_summary=nil)
  if new_summary
    @summary = new_summary
  else
    @summary || if superclass.kind_of?(ClassMethods)
                  superclass.summary
                end
  end
end