Class: Yanagi::Audit::Finding

Inherits:
Struct
  • Object
show all
Defined in:
lib/yanagi/audit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#approvedObject

Returns the value of attribute approved

Returns:

  • (Object)

    the current value of approved



34
35
36
# File 'lib/yanagi/audit.rb', line 34

def approved
  @approved
end

#canonicalObject

Returns the value of attribute canonical

Returns:

  • (Object)

    the current value of canonical



34
35
36
# File 'lib/yanagi/audit.rb', line 34

def canonical
  @canonical
end

#colObject

Returns the value of attribute col

Returns:

  • (Object)

    the current value of col



34
35
36
# File 'lib/yanagi/audit.rb', line 34

def col
  @col
end

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



34
35
36
# File 'lib/yanagi/audit.rb', line 34

def file
  @file
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



34
35
36
# File 'lib/yanagi/audit.rb', line 34

def line
  @line
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



34
35
36
# File 'lib/yanagi/audit.rb', line 34

def message
  @message
end

#tierObject

Returns the value of attribute tier

Returns:

  • (Object)

    the current value of tier



34
35
36
# File 'lib/yanagi/audit.rb', line 34

def tier
  @tier
end

#tokenObject

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



34
35
36
# File 'lib/yanagi/audit.rb', line 34

def token
  @token
end

Instance Method Details

#to_hObject



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/yanagi/audit.rb', line 45

def to_h
  {
    "file" => file,
    "line" => line,
    "col" => col,
    "token" => token,
    "tier" => tier,
    "message" => message,
    "canonical" => canonical,
    "approved" => approved || false
  }
end