class GoodData::HeadlineItem

Constants

ASSIGNABLE_MEMBERS
EMPTY_OBJECT

Public Class Methods

create(tab, item) click to toggle source
# File lib/gooddata/models/metadata/dashboard/headline_item.rb, line 27
def create(tab, item)
  res = GoodData::HeadlineItem.new(tab, GoodData::Helpers.deep_dup(GoodData::Helpers.stringify_keys(EMPTY_OBJECT)))
  item.each do |k, v|
    res.send("#{k}=", v) if ASSIGNABLE_MEMBERS.include? k
  end
  res
end
new(tab, json) click to toggle source
Calls superclass method GoodData::DashboardItem::new
# File lib/gooddata/models/metadata/dashboard/headline_item.rb, line 36
def initialize(tab, json)
  super
end

Public Instance Methods

linked_with_external_filter() click to toggle source
# File lib/gooddata/models/metadata/dashboard/headline_item.rb, line 48
def linked_with_external_filter
  data['linkedWithExternalFilter']
end
linked_with_external_filter=(new_linked_with_external_filter) click to toggle source
# File lib/gooddata/models/metadata/dashboard/headline_item.rb, line 52
def linked_with_external_filter=(new_linked_with_external_filter)
  data['linked_with_external_filter'] = new_linked_with_external_filter ? 1 : 0
end
metric() click to toggle source
# File lib/gooddata/models/metadata/dashboard/headline_item.rb, line 40
def metric
  data['metric']
end
metric=(new_metric) click to toggle source
# File lib/gooddata/models/metadata/dashboard/headline_item.rb, line 44
def metric=(new_metric)
  data['metric'] = new_metric.respond_to?(:uri) ? new_metric.uri : new_metric
end