Sha256: 9094e983d4c90316ca884c11a2e217d64652ceee911bcd606f63ae259e8ca0a6

Contents?: true

Size: 538 Bytes

Versions: 14

Compression:

Stored size: 538 Bytes

Contents

require "forwardable"
require "swa/data_presentation"

module Swa

  class Resource

    def self.list(aws_resources)
      aws_resources.lazy.map(&method(:new))
    end

    def initialize(aws_resource)
      @aws_resource = aws_resource
    end

    attr_reader :aws_resource
    alias_method :_resource_, :aws_resource

    include DataPresentation

    def data
      camelize_keys(_resource_.data.to_h)
    end

    extend Forwardable

    def self.delegate(*methods)
      def_delegators :aws_resource, *methods
    end

  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
swa-0.7.2 lib/swa/resource.rb
swa-0.7.1 lib/swa/resource.rb
swa-0.7.0 lib/swa/resource.rb
swa-0.6.1 lib/swa/resource.rb
swa-0.6.0 lib/swa/resource.rb
swa-0.5.2 lib/swa/resource.rb
swa-0.5.1 lib/swa/resource.rb
swa-0.5.0 lib/swa/resource.rb
swa-0.4.4 lib/swa/resource.rb
swa-0.4.3 lib/swa/resource.rb
swa-0.4.2 lib/swa/resource.rb
swa-0.4.1 lib/swa/resource.rb
swa-0.4.0 lib/swa/resource.rb
swa-0.3.3 lib/swa/resource.rb