Sha256: 66dbfc62b474643464b7b645c240781f904386e898e76f1a0ae190ece8906676

Contents?: true

Size: 490 Bytes

Versions: 13

Compression:

Stored size: 490 Bytes

Contents

module Hyla
  class Command
    program :int_block do
      # kill threads etc
      # make sure to exit or abort, otherwise your program keeps running
      Hyla::logger.warn "CTRL-C / Shutdown command received"
      exit 1
    end

    #
    # Check mandatory options
    #
    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

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hyla-1.0.7.pre.7 lib/hyla/command.rb
hyla-1.0.7.pre.6 lib/hyla/command.rb
hyla-1.0.7.pre.5 lib/hyla/command.rb
hyla-1.0.7.pre.3 lib/hyla/command.rb
hyla-1.0.7.pre.2 lib/hyla/command.rb
hyla-1.0.7.pre.1 lib/hyla/command.rb
hyla-1.0.6 lib/hyla/command.rb
hyla-1.0.5 lib/hyla/command.rb
hyla-1.0.5.pre.1 lib/hyla/command.rb
hyla-1.0.4 lib/hyla/command.rb
hyla-1.0.3 lib/hyla/command.rb
hyla-1.0.2 lib/hyla/command.rb
hyla-1.0.1 lib/hyla/command.rb