class GoodData::LCM2::Dsl::TypeDsl
Attributes
params[R]
Public Class Methods
new()
click to toggle source
# File lib/gooddata/lcm/dsl/type_dsl.rb, line 15 def initialize @params = {} new_param end
Public Instance Methods
array_of(type)
click to toggle source
# File lib/gooddata/lcm/dsl/type_dsl.rb, line 23 def array_of(type) Type::ArrayType.new(type) end
description(desc)
click to toggle source
# File lib/gooddata/lcm/dsl/type_dsl.rb, line 35 def description(desc) @param.description = desc end
instance_of(type)
click to toggle source
# File lib/gooddata/lcm/dsl/type_dsl.rb, line 27 def instance_of(type) type.new end
new_param()
click to toggle source
# File lib/gooddata/lcm/dsl/type_dsl.rb, line 31 def new_param @param = Type::Param.new end
param(name, type, opts = {})
click to toggle source
# File lib/gooddata/lcm/dsl/type_dsl.rb, line 39 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