class SparkleFormation::Error::NotFound
File not found error
Attributes
name[R]
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File lib/sparkle_formation/error.rb, line 18 def initialize(*args) opts = args.detect { |o| o.is_a?(Hash) } args.delete(opts) if opts super(args) @name = opts[:name] if opts end
Public Instance Methods
to_s()
click to toggle source
@return [String] customized message including name
# File lib/sparkle_formation/error.rb, line 26 def to_s if name "Failed to locate item named: `#{name}`" else "Failed to locate item" end end