Class: Violation

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line:, description:, file: nil, name: nil, snippet: nil) ⇒ Violation

Returns a new instance of Violation.



4
5
6
7
8
9
10
# File 'lib/claws/violation.rb', line 4

def initialize(line:, description:, file: nil, name: nil, snippet: nil)
  @file = file
  @name = name
  @line = line
  @snippet = snippet
  @description = description
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



2
3
4
# File 'lib/claws/violation.rb', line 2

def description
  @description
end

#fileObject

Returns the value of attribute file.



2
3
4
# File 'lib/claws/violation.rb', line 2

def file
  @file
end

#lineObject

Returns the value of attribute line.



2
3
4
# File 'lib/claws/violation.rb', line 2

def line
  @line
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/claws/violation.rb', line 2

def name
  @name
end

#snippetObject

Returns the value of attribute snippet.



2
3
4
# File 'lib/claws/violation.rb', line 2

def snippet
  @snippet
end