Sha256: 66c13db3b92c4a7eda285942a9275e2c13cef7dbef153c974f699669d63cb6bb

Contents?: true

Size: 200 Bytes

Versions: 178

Compression:

Stored size: 200 Bytes

Contents

class Array
  def single_resource(id = nil)
    if self.count > 1
      raise Awspec::DuplicatedResourceTypeError, "Duplicated resource type #{id}"
    end
    self.first if self.count == 1
  end
end

Version data entries

178 entries across 178 versions & 4 rubygems

Version Path
awspec-1.25.1 lib/awspec/ext/array.rb
awspec-1.25.0 lib/awspec/ext/array.rb
awspec-1.24.4 lib/awspec/ext/array.rb
awspec-1.24.3 lib/awspec/ext/array.rb
awspec-1.24.2 lib/awspec/ext/array.rb
awspec-1.24.1 lib/awspec/ext/array.rb
awspec-1.24.0 lib/awspec/ext/array.rb
awspec-1.23.0 lib/awspec/ext/array.rb
awspec-1.22.1 lib/awspec/ext/array.rb
awspec-1.22.0 lib/awspec/ext/array.rb
awspec-1.21.1 lib/awspec/ext/array.rb
awspec-1.21.0 lib/awspec/ext/array.rb
awspec-1.20.0 lib/awspec/ext/array.rb
awspec-1.19.2 lib/awspec/ext/array.rb
awspec-1.19.1 lib/awspec/ext/array.rb
awspec-1.19.0 lib/awspec/ext/array.rb
cthiesfork-awspec-1.2.4 lib/awspec/ext/array.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/ext/array.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/ext/array.rb
awspec-1.18.6 lib/awspec/ext/array.rb