Sha256: 6860ca9cfb774bc7a939a0f114cb0e2359760b493bebbd554b196f847e90233a

Contents?: true

Size: 771 Bytes

Versions: 19

Compression:

Stored size: 771 Bytes

Contents

# Copyright (C) 2008-2011 AMEE UK Ltd. - http://www.amee.com
# Released as Open Source Software under the BSD 3-Clause license. See LICENSE.txt for details.

require 'ostruct'

module MetaHelper
  def putmeta(args = {})
    tags=args.delete(:tags)
    args.merge! putmeta_args # Added in order to abstract PUTs away from providing arguments in the call. Eventually args param will be deprecated.
    @connection.v3_put(metapath,args)
    puttags(tags) if tags
    loadmeta
  end
  def puttags(tags)
    existing_tags=AMEE::Tags.new(@connection,:category=>uid)
    existing_tags.reset_to(tags)
  end
  def loadmeta
    resp=@connection.v3_get(metapath)
    @doc=load_xml_doc(resp)
    parsemeta
    @meta
  end
  private :loadmeta
  def meta
    @meta||=loadmeta
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
amee-4.4.0 lib/amee/v3/meta_helper.rb
amee-4.3.2 lib/amee/v3/meta_helper.rb
amee-4.3.1 lib/amee/v3/meta_helper.rb
amee-4.3.0 lib/amee/v3/meta_helper.rb
amee-4.2.0 lib/amee/v3/meta_helper.rb
amee-3.2.1 lib/amee/v3/meta_helper.rb
amee-3.2.0 lib/amee/v3/meta_helper.rb
amee-4.1.7 lib/amee/v3/meta_helper.rb
amee-4.1.6 lib/amee/v3/meta_helper.rb
amee-4.1.5 lib/amee/v3/meta_helper.rb
amee-4.1.4 lib/amee/v3/meta_helper.rb
amee-4.1.3 lib/amee/v3/meta_helper.rb
amee-3.1.2 lib/amee/v3/meta_helper.rb
amee-3.1.1 lib/amee/v3/meta_helper.rb
amee-4.1.2 lib/amee/v3/meta_helper.rb
amee-4.1.1 lib/amee/v3/meta_helper.rb
amee-4.1.0 lib/amee/v3/meta_helper.rb
amee-4.0.0 lib/amee/v3/meta_helper.rb
amee-3.0.1 lib/amee/v3/meta_helper.rb