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.6.22 lib/serverspec/type/base.rb
serverspec-0.6.21 lib/serverspec/type/base.rb
serverspec-0.6.20 lib/serverspec/type/base.rb
serverspec-0.6.19 lib/serverspec/type/base.rb
serverspec-0.6.18 lib/serverspec/type/base.rb
serverspec-0.6.17 lib/serverspec/type/base.rb
serverspec-0.6.16 lib/serverspec/type/base.rb
serverspec-0.6.15 lib/serverspec/type/base.rb
serverspec-0.6.13 lib/serverspec/type/base.rb
serverspec-0.6.12 lib/serverspec/type/base.rb
serverspec-0.6.11 lib/serverspec/type/base.rb
serverspec-0.6.10 lib/serverspec/type/base.rb
serverspec-0.6.9 lib/serverspec/type/base.rb
serverspec-0.6.8 lib/serverspec/type/base.rb
serverspec-0.6.7 lib/serverspec/type/base.rb
serverspec-0.6.6 lib/serverspec/type/base.rb
serverspec-0.6.5 lib/serverspec/type/base.rb
serverspec-0.6.4 lib/serverspec/type/base.rb
serverspec-0.6.3 lib/serverspec/type/base.rb
serverspec-0.6.2 lib/serverspec/type/base.rb