Sha256: 89a2570417612cbada93da37abf7f21bf76e8635c65a49feea6f1b23187b45a9

Contents?: true

Size: 541 Bytes

Versions: 1

Compression:

Stored size: 541 Bytes

Contents

require File.join(File.dirname(__FILE__), "metadata")

module GoodData
  class Attribute < GoodData::MdObject 

    root_key :attribute

    class << self
      def [](id)
        if id == :all
          GoodData.get(GoodData.project.md['query'] + '/attributes/')['query']['entries']
        else 
          super
        end
      end
    end

    def display_forms
      content["displayForms"].map {|df| GoodData::DisplayForm[df["meta"]["uri"]]}
    end
    alias :labels :display_forms

    def is_attribute?
      true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gooddata-0.6.0.pre11 lib/gooddata/models/attribute.rb