Sha256: 2260a7f5e29498799661bffa1d356147362c0df437e60713cf963be4888b18e0

Contents?: true

Size: 1008 Bytes

Versions: 26

Compression:

Stored size: 1008 Bytes

Contents

# encoding: UTF-8
#
# Copyright (c) 2010-2015 GoodData Corporation. All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

require_relative 'dashboard_item'

module GoodData
  class IframeItem < DashboardItem
    EMPTY_OBJECT = {
      'textItem' => {
        'positionX' => 0,
        'sizeY' => 200,
        'sizeX' => 300,
        'positionY' => 0
      }
    }

    ASSIGNABLE_MEMBERS = DashboardItem::ASSIGNABLE_MEMBERS + [
      :url
    ]

    class << self
      def create(tab, item)
        res = GoodData::IframeItem.new(tab, GoodData::Helpers.deep_dup(GoodData::Helpers.deep_stringify_keys(EMPTY_OBJECT)))
        item.each do |k, v|
          res.send("#{k}=", v) if ASSIGNABLE_MEMBERS.include? k
        end
        res
      end
    end

    def initialize(tab, json)
      super
    end

    def url
      data['url']
    end

    def url=(new_url)
      data['url'] = new_url
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
gooddata-edge-0.6.27.edge lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.49 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.48 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.47 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.46 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.45 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.44 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.43 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.42 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.41 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.40 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.39 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.38 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.37 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.36 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.35 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.34 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.33 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.32 lib/gooddata/models/metadata/dashboard/iframe_item.rb
gooddata-0.6.31 lib/gooddata/models/metadata/dashboard/iframe_item.rb