class Inspec::Tag

Attributes

key[RW]
value[RW]

Public Class Methods

new(key, value) click to toggle source
# File lib/inspec/objects/tag.rb, line 10
def initialize(key, value)
  @key = key
  @value = value

  Inspec.deprecate(:object_classes, "The Inspec::Tag class is deprecated. Use the Inspec::Object::Tag class from the inspec-objects Ruby library.")
end

Public Instance Methods

to_hash() click to toggle source
# File lib/inspec/objects/tag.rb, line 17
def to_hash
  {
    name: key,
    value: value,
  }
end
to_ruby() click to toggle source
# File lib/inspec/objects/tag.rb, line 24
def to_ruby
  "tag #{key}: #{value.inspect}"
end
to_s() click to toggle source
# File lib/inspec/objects/tag.rb, line 28
def to_s
  "Tag #{key} with #{value}"
end