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 6 def method_missing_via_black_list(name, delegate_to: nil) raise ArguementError, '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) case attr when Aws::Resources::Resource 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 32 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 38 def match_white_list?(name) WHITE_LIST_RE =~ name end