Class: Mondrian::OLAP::Schema::Level

Inherits:
Mondrian::OLAP::SchemaElement show all
Defined in:
lib/mondrian/olap/schema.rb

Instance Attribute Summary

Attributes inherited from Mondrian::OLAP::SchemaElement

#xml_fragments

Instance Method Summary collapse

Methods inherited from Mondrian::OLAP::SchemaElement

attributes, content, data_dictionary_names, elements, #to_xml, #xml

Constructor Details

#initialize(name = nil, attributes = {}, parent = nil) ⇒ Level

Returns a new instance of Level.



235
236
237
238
239
240
241
# File 'lib/mondrian/olap/schema.rb', line 235

def initialize(name = nil, attributes = {}, parent = nil)
  super
  # set :unique_members by default to true for first level and false for next levels
  if @attributes[:unique_members].nil?
    @attributes[:unique_members] = parent.levels.empty?
  end
end