Class: FPM::Command::Validator

Inherits:
Object
  • Object
show all
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

Methods included from Util

#copied_entries, #copy_entry, #default_shell, #expand_pessimistic_constraints, #logger, #mknod_w, #program_exists?, #program_in_path?, #safesystem, #safesystemout, #tar_cmd, #with

Constructor Details

#initialize(command) ⇒ Validator

Returns a new instance of Validator.



524
525
526
527
528
529
530
# File 'lib/fpm/command.rb', line 524

def initialize(command)
  @command = command
  @valid = true
  @messages = []

  validate
end

Instance Method Details

#messagesObject

def mandatory



592
593
594
# File 'lib/fpm/command.rb', line 592

def messages
  return @messages
end

#ok?Boolean

def initialize

Returns:

  • (Boolean)


532
533
534
# File 'lib/fpm/command.rb', line 532

def ok?
  return @valid
end