Sha256: 62fb7c6ead7f022b9dd20ba5330f6c35661eaafb17626609c2396f4091e986d0

Contents?: true

Size: 1.33 KB

Versions: 77

Compression:

Stored size: 1.33 KB

Contents

# encoding: UTF-8
#
# Copyright (c) 2010-2017 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 '../../../rest/resource'

module GoodData
  class DashboardItem < Rest::Resource
    attr_reader :tab
    attr_accessor :json

    ASSIGNABLE_MEMBERS = [
      :pos_x,
      :pos_y,
      :position_x,
      :position_y,
      :size_x,
      :size_y
    ]

    def initialize(tab, json)
      @tab = tab
      @json = json
    end

    def filters
      data['filters']
    end

    def filters=(new_filters)
      data['filters'] = new_filters
    end

    def position_x
      data['positionX']
    end

    alias_method :pos_x, :position_x

    def position_x=(new_position_x)
      data['positionX'] = new_position_x
    end

    alias_method :pos_x=, :position_x=

    def position_y
      data['positionY']
    end

    alias_method :pos_y, :position_y

    def position_y=(new_position_y)
      data['positionY'] = new_position_y
    end

    alias_method :pos_y=, :position_y=

    def size_x
      data['sizeX']
    end

    def size_x=(new_size_x)
      data['sizeX'] = new_size_x
    end

    def size_y
      data['sizeY']
    end

    def size_y=(new_size_y)
      data['sizeY'] = new_size_y
    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
gooddata-2.3.1-java lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.3.1 lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.3.0-java lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.3.0 lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.2.0-java lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.2.0 lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.19-java lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.19 lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.17-java lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.17 lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.15-java lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.15 lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.14-java lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.14 lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.13-java lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.13 lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.12-java lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.12 lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.11-java lib/gooddata/models/metadata/dashboard/dashboard_item.rb
gooddata-2.1.11 lib/gooddata/models/metadata/dashboard/dashboard_item.rb