Sha256: 3024d646072ed76f80a0e55a1603ab1e064492460ec0a759396ce4e17f2b7e92

Contents?: true

Size: 397 Bytes

Versions: 6

Compression:

Stored size: 397 Bytes

Contents

# encoding:utf-8

module Inspec
  class Tag
    attr_accessor :key, :value

    def initialize(key, value)
      @key = key
      @value = value
    end

    def to_hash
      {
        name: key,
        value: value,
      }
    end

    def to_ruby
      "tag #{key.inspect}: #{value.inspect}"
    end

    def to_s
      "Tag #{key} with #{value}"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inspec-2.1.81 lib/inspec/objects/tag.rb
inspec-2.1.21 lib/inspec/objects/tag.rb
inspec-2.1.10 lib/inspec/objects/tag.rb
inspec-2.0.32 lib/inspec/objects/tag.rb
inspec-2.0.17 lib/inspec/objects/tag.rb
inspec-1.51.15 lib/inspec/objects/tag.rb