Class: ProgramNameCommand
- Inherits:
-
AbstractCommand
- Object
- AbstractCommand
- ProgramNameCommand
- Defined in:
- lib/audit/lib/parser/command/program_name_command.rb
Constant Summary collapse
- COMMAND =
"PROGRAM_NAME"
Instance Attribute Summary
Attributes inherited from AbstractCommand
Instance Method Summary collapse
-
#initialize(check, severity, args) ⇒ ProgramNameCommand
constructor
A new instance of ProgramNameCommand.
- #result ⇒ Object
Methods inherited from AbstractCommand
Constructor Details
#initialize(check, severity, args) ⇒ ProgramNameCommand
Returns a new instance of ProgramNameCommand.
31 32 33 34 35 36 37 |
# File 'lib/audit/lib/parser/command/program_name_command.rb', line 31 def initialize(check, severity, args) @name = args[0].strip if args.length >= 1 or raise ParseException "#{COMMAND} did not supply the program name argument: '#{text}'" @version = args[1].strip if args.length >= 2 = (args.length >= 3 ? args[2 .. -1].join : nil) super(check, severity, ) end |
Instance Method Details
#result ⇒ Object
39 40 41 |
# File 'lib/audit/lib/parser/command/program_name_command.rb', line 39 def result() return ProgramNameCommandResult.new(@check, @severity, @message, @name, @version) end |