Method: Inspec::Attribute#initialize

Defined in:
lib/inspec/objects/attribute.rb

#initialize(name, options = {}) ⇒ Attribute

Returns a new instance of Attribute.



42
43
44
45
46
47
# File 'lib/inspec/objects/attribute.rb', line 42

def initialize(name, options = {})
  @name = name
  @opts = options
  validate_value_type(default) if @opts.key?(:type) && @opts.key?(:default)
  @value = nil
end