class GoodData::LCM2::Dsl::ParamsDsl
Attributes
params[R]
Public Class Methods
new()
click to toggle source
# File lib/gooddata/lcm/dsl/params_dsl.rb, line 14 def initialize @params = {} new_param end
Public Instance Methods
array_of(type)
click to toggle source
# File lib/gooddata/lcm/dsl/params_dsl.rb, line 22 def array_of(type) Type::ArrayType.new(type) end
description(desc)
click to toggle source
# File lib/gooddata/lcm/dsl/params_dsl.rb, line 34 def description(desc) @param.description = desc end
instance_of(type)
click to toggle source
# File lib/gooddata/lcm/dsl/params_dsl.rb, line 26 def instance_of(type) type.new end
new_param()
click to toggle source
# File lib/gooddata/lcm/dsl/params_dsl.rb, line 30 def new_param @param = Type::Param.new end
param(name, type, opts = {})
click to toggle source
# File lib/gooddata/lcm/dsl/params_dsl.rb, line 38 def param(name, type, opts = {}) @param.name = name @param.type = type @param.opts = opts @params[name] = { name: @param.name, type: @param.type, opts: @param.opts, description: @param.description, category: @param.type.class.const_get(:CATEGORY) } # Create new instance of param new_param end