Class: Pennyworth::Presenters::StandardError

Inherits:
Object
  • Object
show all
Defined in:
lib/pennyworth/presenters/standard_error.rb

Overview

Renders a standard error into a compatible format for use in Alfred script filters.

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ StandardError

Returns a new instance of StandardError.



11
12
13
# File 'lib/pennyworth/presenters/standard_error.rb', line 11

def initialize record
  @record = record
end

Instance Method Details

#idObject



15
# File 'lib/pennyworth/presenters/standard_error.rb', line 15

def id = label

#labelObject



17
# File 'lib/pennyworth/presenters/standard_error.rb', line 17

def label = record.name.to_s

#pathObject



19
# File 'lib/pennyworth/presenters/standard_error.rb', line 19

def path = file_path.empty? ? "" : [file_path, record.line_number].compress.join(":")