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