Class: FPM::Command::Validator
- Inherits:
-
Object
- Object
- FPM::Command::Validator
- Includes:
- Util
- Defined in:
- lib/fpm/command.rb
Overview
A simple flag validator
The goal of this class is to ensure the flags and arguments given are a valid configuration.
Instance Method Summary collapse
-
#initialize(command) ⇒ Validator
constructor
A new instance of Validator.
-
#messages ⇒ Object
def mandatory.
-
#ok? ⇒ Boolean
def initialize.
Methods included from Util
#copied_entries, #copy_entry, #default_shell, #mknod_w, #program_exists?, #program_in_path?, #safesystem, #safesystemout, #tar_cmd, #with
Constructor Details
#initialize(command) ⇒ Validator
Returns a new instance of Validator.
460 461 462 463 464 465 466 |
# File 'lib/fpm/command.rb', line 460 def initialize(command) @command = command @valid = true = [] validate end |
Instance Method Details
#messages ⇒ Object
def mandatory
528 529 530 |
# File 'lib/fpm/command.rb', line 528 def return end |
#ok? ⇒ Boolean
def initialize
468 469 470 |
# File 'lib/fpm/command.rb', line 468 def ok? return @valid end |