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