class Epics::Error

Attributes

code[R]

Public Class Methods

new(code) click to toggle source
# File lib/epics/error.rb, line 9
def initialize(code)
  @code = code
  @error = self.class::ERRORS.fetch(code, {})
end

Public Instance Methods

short_text() click to toggle source
# File lib/epics/error.rb, line 18
def short_text
  @error.fetch("short_text", "unknown")
end
symbol() click to toggle source
# File lib/epics/error.rb, line 14
def symbol
  @error.fetch("symbol", "EPICS_UNKNOWN")
end
to_s() click to toggle source
# File lib/epics/error.rb, line 5
def to_s
  [@error.fetch("symbol", "EPICS_UNKNOWN"), @error.fetch("short_text", "unknown")].join(" - ")
end