Class: Take::Lint::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/take/lint/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Error

Returns a new instance of Error.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/take/lint/error.rb', line 11

def initialize(data = {})
  data.each do |key, value|
    key = :"#{key}="

    if respond_to? key
      send key, value
    else
      raise ArgumentError, "Bad key given"
    end
  end
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



8
9
10
# File 'lib/take/lint/error.rb', line 8

def column
  @column
end

#descriptionObject

Returns the value of attribute description.



9
10
11
# File 'lib/take/lint/error.rb', line 9

def description
  @description
end

#fileObject

Returns the value of attribute file.



6
7
8
# File 'lib/take/lint/error.rb', line 6

def file
  @file
end

#lineObject

Returns the value of attribute line.



7
8
9
# File 'lib/take/lint/error.rb', line 7

def line
  @line
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/take/lint/error.rb', line 5

def type
  @type
end