Sha256: 6efa6a7b18bc048bc5a2891c8feec06958c9b02492d43358d1b4d2175f3e72c0
Contents?: true
Size: 800 Bytes
Versions: 23
Compression:
Stored size: 800 Bytes
Contents
# Author:: Eric Crane (mailto:eric.crane@mac.com) # Copyright:: Copyright (c) 2020 Eric Crane. All rights reserved. # # Wait for the given number of seconds. # module GlooLang module Verbs class Wait < GlooLang::Core::Verb KEYWORD = 'wait'.freeze KEYWORD_SHORT = 'w'.freeze # # Run the verb. # def run x = 1 if @tokens.token_count > 1 expr = GlooLang::Expr::Expression.new( @engine, @tokens.params ) x = expr.evaluate.to_i end sleep x end # # Get the Verb's keyword. # def self.keyword return KEYWORD end # # Get the Verb's keyword shortcut. # def self.keyword_shortcut return KEYWORD_SHORT end end end end
Version data entries
23 entries across 23 versions & 1 rubygems