Module: Ronin::Exploits::Metadata::DefaultFilename::ClassMethods

Defined in:
lib/ronin/exploits/metadata/default_filename.rb

Overview

Class-methods.

Instance Method Summary collapse

Instance Method Details

#default_filename(new_default_filename = nil) ⇒ Integer?

Gets or sets the exploit's default filename.

Examples:

default_filename 'exploit.docx'

Parameters:

  • new_default_filename (Integer, nil) (defaults to: nil)

    The optional new default filename to set.

Returns:

  • (Integer, nil)

    The exploit's default filename.



60
61
62
63
64
65
66
67
68
# File 'lib/ronin/exploits/metadata/default_filename.rb', line 60

def default_filename(new_default_filename=nil)
  if new_default_filename
    @default_filename = new_default_filename
  else
    @default_filename ||= if superclass.kind_of?(ClassMethods)
                            superclass.default_filename
                          end
  end
end