Sha256: af1ac9bceeb8e8801b5daba1d8a9ec64fb914d9d14f79aae209cea5e31b9f6ec

Contents?: true

Size: 370 Bytes

Versions: 1

Compression:

Stored size: 370 Bytes

Contents

class Assemble::Client::Tags < Cistern::Collection

  model Assemble::Client::Tag

  def all(options={})
    results = self.connection.get_tags.body["QueryResult"]["Results"]
    self.load(results.map { |r| {"id" => r["_refObjectUUID"], "name" => r["_refObjectName"]} })
  end

  def get(object_id)
    self.new(self.connection.get_tag(object_id).body["Tag"])
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
assemble-0.0.1 lib/assemble/models/tags.rb