Exception: Exercise::CourseContentRenderingError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/commands/exercise/command.rb

Instance Method Summary collapse

Constructor Details

#initialize(files) ⇒ CourseContentRenderingError

Returns a new instance of CourseContentRenderingError.



11
12
13
14
15
16
17
18
# File 'lib/commands/exercise/command.rb', line 11

def initialize(files)
  error = <<~ERROR
    Unable to render:
    - #{files.collect { |file| File.expand_path(file) }.join("\n- ")}"
  ERROR

  super error
end

Instance Method Details

#==(other) ⇒ Object



20
21
22
# File 'lib/commands/exercise/command.rb', line 20

def ==(other)
  other.is_a?(CourseContentRenderingError) && message == other.message
end