class Serverspec::Type::Base

Attributes

name[R]

Public Class Methods

new(name=nil, options = {}) click to toggle source
# File lib/serverspec/type/base.rb, line 6
def initialize(name=nil, options = {})
  @name    = name
  @options = options
  @runner  = Specinfra::Runner
end

Public Instance Methods

inspect() click to toggle source
# File lib/serverspec/type/base.rb, line 19
def inspect
  if defined?(PowerAssert)
    @inspection
  else
    to_s
  end
end
to_ary() click to toggle source
# File lib/serverspec/type/base.rb, line 27
def to_ary
  to_s.split(" ")
end
to_s() click to toggle source
# File lib/serverspec/type/base.rb, line 12
def to_s
  type = self.class.name.split(':')[-1]
  type.gsub!(/([a-z\d])([A-Z])/, '\1 \2')
  type.capitalize!
  %Q!#{type} "#{@name}"!
end