Sha256: 9dd3e91f21a9dbd1adbbc3a6023962b77103ac9280832d349211cd71fcb5fa40
Contents?: true
Size: 870 Bytes
Versions: 41
Compression:
Stored size: 870 Bytes
Contents
module Specinfra module Backend module PowerShell class Command attr_reader :import_functions, :script def initialize &block @import_functions = [] @script = "" instance_eval(&block) if block_given? end def using *functions functions.each { |f| import_functions << f } end def exec code @script = code end def convert_regexp(target) case target when Regexp target.source else target.to_s.gsub '(^\/|\/$)', '' end end def get_identity id raise "You must provide a specific Windows user/group" if id =~ /(owner|group|others)/ identity = id || 'Everyone' end def to_s @script end end end end end
Version data entries
41 entries across 41 versions & 1 rubygems