Sha256: 1a306768839cc3057a1cbdfded9c4ee73b0970e8033c85e172f775decfaeb729

Contents?: true

Size: 1.17 KB

Versions: 26

Compression:

Stored size: 1.17 KB

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 'user_filter'

module GoodData
  class VariableUserFilter < UserFilter
    # Creates or updates the variable user filter on the server
    #
    # @return [String]
    def save
      res = client.post(uri, :variable => @json)
      @json[:uri] = res['uri']
      self
    end

    # Method used for replacing values in their state according to mapping. Can be used to replace any values but it is typically used to replace the URIs. Returns a new object of the same type.
    #
    # @param [Array<Array>]Mapping specifying what should be exchanged for what. As mapping should be used output of GoodData::Helpers.prepare_mapping.
    # @return [GoodData::VariableUserFilter]
    def replace(mapping)
      x = GoodData::MdObject.replace_quoted(self, mapping)
      x = GoodData::MdObject.replace_bracketed(x, mapping)
      vals = GoodData::MdObject.find_replaceable_values(x, mapping)
      GoodData::MdObject.replace_bracketed(x, vals)
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

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