Class: Straycall::Violation

Inherits:
Struct
  • Object
show all
Defined in:
lib/straycall/violation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



4
5
6
# File 'lib/straycall/violation.rb', line 4

def action
  @action
end

#backtraceObject

Returns the value of attribute backtrace

Returns:

  • (Object)

    the current value of backtrace



4
5
6
# File 'lib/straycall/violation.rb', line 4

def backtrace
  @backtrace
end

#exampleObject

Returns the value of attribute example

Returns:

  • (Object)

    the current value of example



4
5
6
# File 'lib/straycall/violation.rb', line 4

def example
  @example
end

#originObject

Returns the value of attribute origin

Returns:

  • (Object)

    the current value of origin



4
5
6
# File 'lib/straycall/violation.rb', line 4

def origin
  @origin
end

#suggestionObject

Returns the value of attribute suggestion

Returns:

  • (Object)

    the current value of suggestion



4
5
6
# File 'lib/straycall/violation.rb', line 4

def suggestion
  @suggestion
end

#syscallObject

Returns the value of attribute syscall

Returns:

  • (Object)

    the current value of syscall



4
5
6
# File 'lib/straycall/violation.rb', line 4

def syscall
  @syscall
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



4
5
6
# File 'lib/straycall/violation.rb', line 4

def target
  @target
end

#tidObject

Returns the value of attribute tid

Returns:

  • (Object)

    the current value of tid



4
5
6
# File 'lib/straycall/violation.rb', line 4

def tid
  @tid
end

Instance Method Details

#to_hObject



5
6
7
# File 'lib/straycall/violation.rb', line 5

def to_h
  {syscall: syscall.to_s, tid:, example:, target:, backtrace:, action: action.to_s, suggestion:, origin:}.compact
end