Exception: Sevgi::MissingComponentError

Inherits:
Error
  • Object
show all
Defined in:
lib/sevgi/core.rb

Overview

Error raised when an optional Sevgi component is required but unavailable.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

call

Constructor Details

#initialize(component) ⇒ void

Builds a missing component error.

Parameters:

  • component (String, Symbol)

    missing component name



34
35
36
37
38
# File 'lib/sevgi/core.rb', line 34

def initialize(component)
  @component = component.to_s

  super("\"#{component}\" required")
end

Instance Attribute Details

#componentString (readonly)

Returns missing component name.

Returns:

  • (String)

    missing component name



29
30
31
# File 'lib/sevgi/core.rb', line 29

def component
  @component
end