Class: Mondrian::OLAP::Schema::CellFormatter

Inherits:
Mondrian::OLAP::SchemaElement show all
Includes:
ScriptElements
Defined in:
lib/mondrian/olap/schema_udf.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, &block) ⇒ CellFormatter

Returns a new instance of CellFormatter.



224
225
226
227
228
229
230
231
# File 'lib/mondrian/olap/schema_udf.rb', line 224

def initialize(name = nil, attributes = {}, parent = nil, &block)
  super
  if name && !attributes[:class_name] && !block_given?
    # use shared ruby implementation
    @attributes[:class_name] = ruby_formatter_java_class_name(name)
    @attributes.delete(:name)
  end
end

Instance Method Details

#ruby(*options, &block) ⇒ Object



233
234
235
# File 'lib/mondrian/olap/schema_udf.rb', line 233

def ruby(*options, &block)
  ruby_formatter(options, Java::mondrian.spi.CellFormatter, 'formatCell', [java.lang.String, java.lang.Object], &block)
end