Sha256: 3a5f99aeea133b2d6b7a5f3f0f4bf19755c135eb7ee8226f0bfdf165652858d8
Contents?: true
Size: 561 Bytes
Versions: 10
Compression:
Stored size: 561 Bytes
Contents
require 'singleton' require 'specinfra/command_result' module SpecInfra module Backend class Base include Singleton def set_commands(c) @commands = c end def set_example(e) @example = e end def commands @commands end def check_zero(cmd, *args) run_command(commands.send(cmd, *args)).success? end # Default action is to call check_zero with args def method_missing(meth, *args, &block) check_zero(meth, *args) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems