Module: MetaHelper

Included in:
AMEE::Admin::ItemValueDefinition
Defined in:
lib/amee/v3/meta_helper.rb

Instance Method Summary collapse

Instance Method Details

#metaObject



25
26
27
# File 'lib/amee/v3/meta_helper.rb', line 25

def meta
  @meta||=loadmeta
end

#putmeta(args = {}) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/amee/v3/meta_helper.rb', line 7

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

#puttags(tags) ⇒ Object



14
15
16
17
# File 'lib/amee/v3/meta_helper.rb', line 14

def puttags(tags)
  existing_tags=AMEE::Tags.new(@connection,:category=>uid)
  existing_tags.reset_to(tags)
end