module Awspec::BlackListForwardable
Constants
- BLACK_LIST_RE
- WHITE_LIST_RE
Public Instance Methods
method_missing_via_black_list(name, delegate_to: nil)
click to toggle source
# File lib/awspec/resource_reader.rb, line 8 def method_missing_via_black_list(name, delegate_to: nil) raise ArgumentError, 'delegate_to: must be specified' unless delegate_to if match_black_list?(name) && !match_white_list?(name) raise CalledMethodInBlackList, "Method call #{name.inspect} is black-listed" end attr = delegate_to.send(name) if !attr.is_a?(Struct) && attr.class.name.match(/^Aws::/) ResourceReader.new(attr) else attr end end
Private Instance Methods
match_black_list?(name)
click to toggle source
# File lib/awspec/resource_reader.rb, line 34 def match_black_list?(name) BLACK_LIST_RE =~ name end
match_white_list?(name)
click to toggle source
# File lib/awspec/resource_reader.rb, line 40 def match_white_list?(name) WHITE_LIST_RE =~ name end