Sha256: ca01ff5d610b6d0659fe09b00ad61fd28c45f8284fde38cb6b001a718f1af5a1

Contents?: true

Size: 500 Bytes

Versions: 3

Compression:

Stored size: 500 Bytes

Contents

module Superscript
  class Ctx
    def method_missing(*args)
      puts "Error: No such command or variable '#{args.first}'"
      exit 1
    end

    def go *args
      puts "Go #{args.join(" ")}!"
    end

    def wait seconds_or_random_range
      amount = if seconds_or_random_range.is_a? Range
        rand(seconds_or_random_range)
      else
        seconds_or_random_range
      end

      sleep amount
    end

    def exit
      Kernel.exit
    end
    def quit
      exit
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
superscript-0.2.2 lib/superscript/ctx.rb
superscript-0.2.1 lib/superscript/ctx.rb
superscript-0.2.0 lib/superscript/ctx.rb