Exception: S7n::NoSuchAttribute

Inherits:
ApplicationError show all
Defined in:
lib/s7n/exception.rb

Overview

機密情報の属性が存在しないことを表現する例外クラス。

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ NoSuchAttribute

Returns a new instance of NoSuchAttribute.



63
64
65
# File 'lib/s7n/exception.rb', line 63

def initialize(options = {})
  @options = options
end

Instance Method Details

#to_sObject



67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/s7n/exception.rb', line 67

def to_s
  if !@options.empty?
    s = ""
    @options.each do |key, value|
      s << " #{key}=<#{value}>"
    end
  end
  if s.empty?
    return _("No such attribute.")
  else
    return _("No such attribute:%s") % s
  end
end