class Awspec::Type::Base
Attributes
Public Class Methods
Public Instance Methods
Source
# File lib/awspec/type/base.rb, line 44 def method_missing(name) name_str = name.to_s if name.instance_of?(Symbol) describe = name_str.tr('-', '_').to_sym if !resource_via_client.nil? && resource_via_client.members.include?(describe) resource_via_client[describe] elsif resource_via_client.nil? raise Awspec::NoExistingResource.new(self.class, @display_name) else super unless respond_to?(:resource) method_missing_via_black_list(name, delegate_to: resource) end end
Calls superclass method
Source
# File lib/awspec/type/base.rb, line 14 def resource_via_client raise 'this method must be override!' end
Source
# File lib/awspec/type/base.rb, line 27 def respond_to_missing?(method, include_private = false) resource_via_client.respond_to?(method) || super unless resource_via_client.nil? end
Calls superclass method
Source
# File lib/awspec/type/base.rb, line 18 def to_s type = self.class.name.demodulize.underscore "#{type} '#{@display_name}'" end
Private Instance Methods
Source
# File lib/awspec/type/base.rb, line 62 def check_existence raise Awspec::NoExistingResource.new(self.class, @display_name) if resource_via_client.nil? end