Module: Ronin::Payloads::Metadata::OS::ClassMethods
- Defined in:
- lib/ronin/payloads/metadata/os.rb
Overview
Class methods which will be added to the payload class which includes Ronin::Payloads::Metadata::OS.
Instance Method Summary collapse
-
#os(new_os = nil) ⇒ :unix, ...
Gets or sets the payload's targeted Operating System (OS).
-
#os_version(new_os_version = nil) ⇒ String?
Gets or sets the payload's targeted Operating System (OS) version.
Instance Method Details
#os(new_os = nil) ⇒ :unix, ...
Gets or sets the payload's targeted Operating System (OS).
62 63 64 65 66 67 68 69 70 |
# File 'lib/ronin/payloads/metadata/os.rb', line 62 def os(new_os=nil) if new_os @os = new_os else @os ||= if superclass.kind_of?(ClassMethods) superclass.os end end end |
#os_version(new_os_version = nil) ⇒ String?
Gets or sets the payload's targeted Operating System (OS) version.
87 88 89 90 91 92 93 94 95 |
# File 'lib/ronin/payloads/metadata/os.rb', line 87 def os_version(new_os_version=nil) if new_os_version @os_version = new_os_version else @os_version ||= if superclass.kind_of?(ClassMethods) superclass.os_version end end end |