class Array

Public Instance Methods

single_resource(id = nil) click to toggle source
# File lib/awspec/ext/array.rb, line 2
def single_resource(id = nil)
  if self.count > 1
    raise Awspec::DuplicatedResourceTypeError, "Duplicated resource type #{id}"
  end
  self.first if self.count == 1
end