Class: CvssCli::CLI
- Inherits:
-
Thor
- Object
- Thor
- CvssCli::CLI
- Defined in:
- lib/cvss_cli.rb
Constant Summary collapse
Instance Method Summary collapse
- #clear ⇒ Object
- #copy ⇒ Object
- #cve(cve_string) ⇒ Object
- #exit ⇒ Object
- #load(cvss_string) ⇒ Object
- #status ⇒ Object
Instance Method Details
#clear ⇒ Object
56 57 58 59 60 |
# File 'lib/cvss_cli.rb', line 56 def clear() @@cvss.clear write_file invoke :status, [] end |
#copy ⇒ Object
42 43 44 |
# File 'lib/cvss_cli.rb', line 42 def copy() Clipboard.copy @@cvss end |
#cve(cve_string) ⇒ Object
70 71 72 73 |
# File 'lib/cvss_cli.rb', line 70 def cve(cve_string) cvss_string = get_cvss_string_from_cve(cve_string) invoke :load, [cvss_string] if cvss_string end |
#exit ⇒ Object
77 78 79 |
# File 'lib/cvss_cli.rb', line 77 def exit Kernel.exit 0 end |
#load(cvss_string) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/cvss_cli.rb', line 47 def load(cvss_string) @@cvss.clear @@cvss.parse_cvss_string(cvss_string) write_file invoke :status, [], full: true invoke :copy, [], [] end |
#status ⇒ Object
64 65 66 67 |
# File 'lib/cvss_cli.rb', line 64 def status() @@cvss.print_status([:full]) invoke :copy, [], [] end |