Class: Specinfra::Command::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/specinfra/command/base.rb

Defined Under Namespace

Classes: Bond, Bridge, Cron, File, Fstab, Group, Host, Interface, Inventory, Ip6tables, Ipfilter, Ipnat, Iptables, KernelModule, Localhost, LxcContainer, MailAlias, NotImplementedError, Package, Port, Ppa, Process, RoutingTable, Selinux, SelinuxModule, Service, User, Yumrepo, Zfs

Class Method Summary collapse

Class Method Details

.createObject



6
7
8
# File 'lib/specinfra/command/base.rb', line 6

def create
  self
end

.escape(target) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/specinfra/command/base.rb', line 10

def escape(target)
  str = case target
        when Regexp
          target.source
        else
          target.to_s
        end

  Shellwords.shellescape(str)
end