Sha256: 262e9e2d6d39a3ae05ded41abeb7da1fc4de83053d19d02e0a15228e81f38ef3

Contents?: true

Size: 303 Bytes

Versions: 41

Compression:

Stored size: 303 Bytes

Contents

module Serverspec
  module Type
    class Base
      def initialize(name=nil)
        @name = name
      end

      def to_s
        type = self.class.name.split(':')[-1]
        type.gsub!(/([a-z\d])([A-Z])/, '\1 \2')
        type.capitalize!
        %Q!#{type} "#{@name}"!
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
serverspec-0.7.11 lib/serverspec/type/base.rb
serverspec-0.7.10 lib/serverspec/type/base.rb
serverspec-0.7.9 lib/serverspec/type/base.rb
serverspec-0.7.8 lib/serverspec/type/base.rb
serverspec-0.7.7 lib/serverspec/type/base.rb
serverspec-0.7.6 lib/serverspec/type/base.rb
serverspec-0.7.5 lib/serverspec/type/base.rb
serverspec-0.7.4 lib/serverspec/type/base.rb
serverspec-0.7.3 lib/serverspec/type/base.rb
serverspec-0.7.2 lib/serverspec/type/base.rb
serverspec-0.7.1 lib/serverspec/type/base.rb
serverspec-0.7.0 lib/serverspec/type/base.rb
serverspec-0.6.30 lib/serverspec/type/base.rb
serverspec-0.6.29 lib/serverspec/type/base.rb
serverspec-0.6.28 lib/serverspec/type/base.rb
serverspec-0.6.27 lib/serverspec/type/base.rb
serverspec-0.6.26 lib/serverspec/type/base.rb
serverspec-0.6.25 lib/serverspec/type/base.rb
serverspec-0.6.24 lib/serverspec/type/base.rb
serverspec-0.6.23 lib/serverspec/type/base.rb