Class: Mondrian::OLAP::Schema::CellFormatter
- Inherits:
-
Mondrian::OLAP::SchemaElement
- Object
- Mondrian::OLAP::SchemaElement
- Mondrian::OLAP::Schema::CellFormatter
- Includes:
- ScriptElements
- Defined in:
- lib/mondrian/olap/schema_udf.rb
Instance Attribute Summary
Attributes inherited from Mondrian::OLAP::SchemaElement
Instance Method Summary collapse
- #coffeescript(text) ⇒ Object
-
#initialize(name = nil, attributes = {}, parent = nil, &block) ⇒ CellFormatter
constructor
A new instance of CellFormatter.
- #ruby(*options, &block) ⇒ Object
Methods included from ScriptElements
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.
283 284 285 286 287 288 289 290 |
# File 'lib/mondrian/olap/schema_udf.rb', line 283 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
#coffeescript(text) ⇒ Object
292 293 294 |
# File 'lib/mondrian/olap/schema_udf.rb', line 292 def coffeescript(text) coffeescript_function('(value)', text) end |
#ruby(*options, &block) ⇒ Object
296 297 298 |
# File 'lib/mondrian/olap/schema_udf.rb', line 296 def ruby(*, &block) ruby_formatter(, Java::mondrian.spi.CellFormatter, 'formatCell', [java.lang.String, java.lang.Object], &block) end |