Class: Haml2html::Diagnostic

Inherits:
Struct
  • Object
show all
Defined in:
lib/haml2html/diagnostic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#featureObject

Returns the value of attribute feature

Returns:

  • (Object)

    the current value of feature



4
5
6
# File 'lib/haml2html/diagnostic.rb', line 4

def feature
  @feature
end

#filenameObject

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



4
5
6
# File 'lib/haml2html/diagnostic.rb', line 4

def filename
  @filename
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



4
5
6
# File 'lib/haml2html/diagnostic.rb', line 4

def line
  @line
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



4
5
6
# File 'lib/haml2html/diagnostic.rb', line 4

def message
  @message
end

Instance Method Details

#to_sObject



5
6
7
8
9
# File 'lib/haml2html/diagnostic.rb', line 5

def to_s
  location = [filename, line].compact.join(":")
  location = "haml" if location.empty?
  "#{location}: #{feature}: #{message}"
end