Sha256: 72323f37fc269b644294d19f3a267b1113bc6f3d548ceee8d64dd2be639541ef

Contents?: true

Size: 990 Bytes

Versions: 52

Compression:

Stored size: 990 Bytes

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

require_relative 'params_dsl'
require_relative 'type_dsl'

require_relative '../../helpers/global_helpers'

module GoodData
  module LCM2
    module Dsl
      module Dsl
        DEFAULT_OPTS = {
          required: false,
          default: nil
        }

        PARAMS = {}
        TYPES = {}

        def process(_klass, type, _caption, &block)
          dsl = type.new
          dsl.instance_eval(&block)

          dsl.params
        end

        def define_params(klass, &block)
          PARAMS[klass] = process(klass, GoodData::LCM2::Dsl::ParamsDsl, 'PARAMS', &block)
        end

        def define_type(klass, &block)
          TYPES[klass] = process(klass, GoodData::LCM2::Dsl::TypeDsl, 'TYPE', &block)
        end
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
gooddata-2.3.1-java lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.3.1 lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.3.0-java lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.3.0 lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.2.0-java lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.2.0 lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.19-java lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.19 lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.17-java lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.17 lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.15-java lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.15 lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.14-java lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.14 lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.13-java lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.13 lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.12-java lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.12 lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.11-java lib/gooddata/lcm/dsl/dsl.rb
gooddata-2.1.11 lib/gooddata/lcm/dsl/dsl.rb