Class: Epuber::Epubcheck::Problem

Inherits:
Struct
  • Object
show all
Defined in:
lib/epuber/epubcheck.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code



19
20
21
# File 'lib/epuber/epubcheck.rb', line 19

def code
  @code
end

#levelObject

Returns the value of attribute level



19
20
21
# File 'lib/epuber/epubcheck.rb', line 19

def level
  @level
end

#locationObject

Returns the value of attribute location



19
20
21
# File 'lib/epuber/epubcheck.rb', line 19

def location
  @location
end

#messageObject

Returns the value of attribute message



19
20
21
# File 'lib/epuber/epubcheck.rb', line 19

def message
  @message
end

Instance Method Details

#error?Boolean



36
37
38
# File 'lib/epuber/epubcheck.rb', line 36

def error?
  level == :error || level == :fatal
end

#to_sObject

!attribute [r] message

@return [String] message of the problem


32
33
34
# File 'lib/epuber/epubcheck.rb', line 32

def to_s
  "#{level}(#{code}): #{location.path}(#{location.lineno},#{location.column}): #{message}"
end