Module: Ronin::Exploits::Metadata::URLPath::ClassMethods

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

Overview

Class-methods.

Instance Method Summary collapse

Instance Method Details

#url_path(new_url_path = nil) ⇒ String

Get or sets the target URL path of the exploit.

Parameters:

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

    The optional new URL path value to set.

Returns:

  • (String)

    The URL path value. Defaults to "/" if not set.



57
58
59
60
61
62
63
64
65
66
67
# File 'lib/ronin/exploits/metadata/url_path.rb', line 57

def url_path(new_url_path=nil)
  if new_url_path
    @url_path = new_url_path
  else
    @url_path ||= if superclass.kind_of?(ClassMethods)
                    superclass.url_path
                  else
                    '/'
                  end
  end
end