Sha256: c9ddd3f8161f0c56d3e168e706bfb8e1838e8fdb927b65b38ab889654423eb6e

Contents?: true

Size: 510 Bytes

Versions: 7

Compression:

Stored size: 510 Bytes

Contents

module Arrest
  class IdsCollection

    def initialize(parent, ids_url)
      @collection = nil
      @parent = parent
      @url = ids_url
    end

    def method_missing(*args, &block)
      collection.send(*args, &block)
    end

    def inspect
      collection.inspect
    end

    private

    def collection
      unless @collection

        r = @parent.class.source().get_one(@parent.context, "#{@url}")
        @collection = @parent.class.body_root(r)

      end
      @collection
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
arrest-0.0.74 lib/arrest/helper/ids_collection.rb
arrest-0.0.73 lib/arrest/helper/ids_collection.rb
arrest-0.0.72 lib/arrest/helper/ids_collection.rb
arrest-0.0.71 lib/arrest/helper/ids_collection.rb
arrest-0.0.70 lib/arrest/helper/ids_collection.rb
arrest-0.0.69 lib/arrest/helper/ids_collection.rb
arrest-0.0.68 lib/arrest/helper/ids_collection.rb