Class: ConvenientService::Service::Plugins::RescuesResultUnhandledExceptions::Commands::FormatLine

Inherits:
ConvenientService::Support::Command show all
Defined in:
lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ConvenientService::Support::Command

[], call

Constructor Details

#initialize(line:) ⇒ void

Parameters:

  • line (String)


24
25
26
# File 'lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb', line 24

def initialize(line:)
  @line = line
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



18
19
20
# File 'lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb', line 18

def line
  @line
end

Instance Method Details

#callString

Note:

Exceptions formatting is inspired by RSpec. It has almost the same output (at least for RSpec 3).

Examples:

Line.


# /gem/lib/convenient_service/factories/services.rb:120:in `result'

Returns:

  • (String)


37
38
39
# File 'lib/convenient_service/service/plugins/rescues_result_unhandled_exceptions/commands/format_line.rb', line 37

def call
  "# #{line}"
end