Class: Hyla::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/hyla/command.rb

Class Method Summary collapse

Class Method Details

.check_mandatory_option?(key, value) ⇒ Boolean

Check mandatory options

Returns:

  • (Boolean)


13
14
15
16
17
18
19
20
# File 'lib/hyla/command.rb', line 13

def self.check_mandatory_option?(key, value)
  if value.nil? or value.empty?
    Hyla.logger.warn "Mandatory option missing: #{key}"
    exit(1)
  else
    true
  end
end