Module: Awspec::BlackListForwardable
- Included in:
- ResourceReader, Type::Base
- Defined in:
- lib/awspec/resource_reader.rb
Defined Under Namespace
Classes: CalledMethodInBlackList
Instance Method Summary collapse
Instance Method Details
#method_missing_via_black_list(name, delegate_to: nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# 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 |