Class: Serverspec::Type::Base
- Inherits:
-
Object
- Object
- Serverspec::Type::Base
- Defined in:
- lib/serverspec/type/base.rb
Direct Known Subclasses
Command, Cron, DefaultGateway, File, Group, Host, Ipfilter, Ipnat, Iptables, LinuxKernelParameter, Package, Port, RoutingTable, Selinux, Service, User, Zfs
Instance Method Summary collapse
-
#initialize(name = nil) ⇒ Base
constructor
A new instance of Base.
- #to_s ⇒ Object
Constructor Details
#initialize(name = nil) ⇒ Base
Returns a new instance of Base.
4 5 6 |
# File 'lib/serverspec/type/base.rb', line 4 def initialize(name=nil) @name = name end |
Instance Method Details
#to_s ⇒ Object
8 9 10 11 |
# File 'lib/serverspec/type/base.rb', line 8 def to_s type = self.class.name.split(':')[-1] %Q!#{type} "#{@name}"! end |