lib/gooddata/models/attribute.rb in gooddata-0.6.0.pre11 vs lib/gooddata/models/attribute.rb in gooddata-0.6.0
- old
+ new
@@ -1,24 +1,26 @@
-require File.join(File.dirname(__FILE__), "metadata")
+# encoding: UTF-8
-module GoodData
- class Attribute < GoodData::MdObject
+require_relative '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
+ else
super
end
end
end
def display_forms
- content["displayForms"].map {|df| GoodData::DisplayForm[df["meta"]["uri"]]}
+ content['displayForms'].map { |df| GoodData::DisplayForm[df['meta']['uri']] }
end
+
alias :labels :display_forms
def is_attribute?
true
end
\ No newline at end of file