Class: Inspec::RunData::Profile::Dependency

Inherits:
Struct
  • Object
show all
Includes:
HashLikeStruct
Defined in:
lib/inspec/run_data/profile.rb

Overview

Good candidate for keyword_init, but that is not in 2.4

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashLikeStruct

#key?, #keys, #non_nil?

Constructor Details

#initialize(raw_dep_data) ⇒ Dependency

Returns a new instance of Dependency.



57
58
59
# File 'lib/inspec/run_data/profile.rb', line 57

def initialize(raw_dep_data)
  %i{name path status status_message git url supermarket compliance branch tag commit version relative_path}.each { |f| self[f] = raw_dep_data[f] }
end

Instance Attribute Details

#branchObject

Returns the value of attribute branch

Returns:

  • (Object)

    the current value of branch



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def branch
  @branch
end

#commitObject

Returns the value of attribute commit

Returns:

  • (Object)

    the current value of commit



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def commit
  @commit
end

#complianceObject

Returns the value of attribute compliance

Returns:

  • (Object)

    the current value of compliance



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def compliance
  @compliance
end

#gitObject

Returns the value of attribute git

Returns:

  • (Object)

    the current value of git



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def git
  @git
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def name
  @name
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def path
  @path
end

#relative_pathObject

Returns the value of attribute relative_path

Returns:

  • (Object)

    the current value of relative_path



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def relative_path
  @relative_path
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def status
  @status
end

#status_messageObject

Returns the value of attribute status_message

Returns:

  • (Object)

    the current value of status_message



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def status_message
  @status_message
end

#supermarketObject

Returns the value of attribute supermarket

Returns:

  • (Object)

    the current value of supermarket



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def supermarket
  @supermarket
end

#tagObject

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def tag
  @tag
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def url
  @url
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



53
54
55
# File 'lib/inspec/run_data/profile.rb', line 53

def version
  @version
end