Module: Olap::View

Defined in:
lib/olap/view.rb,
lib/olap/view/engine.rb,
lib/olap/view/version.rb

Defined Under Namespace

Classes: Engine, Parse

Constant Summary collapse

VERSION =
"0.0.16"
@@view_options =
{
    no_data: "Not enough data to display",
    undefined: "-",
    total: "Total"
}

Class Method Summary collapse

Class Method Details

.default_options=(options = {}) ⇒ Object

Configure the default options to connect to XMLA server Can be optionally used to setup connection options in one place in application,

Example:

>> Olap::View.default_options = {no_data: 'Text for no data', undefined: 'Undefined element name', total: 'Total title'}
>> Olap::View.request mdx
=> #<Olap::View::Parse:0x007ffa2b9f60f0 @response=#<Olap::Xmla::Response:0x007ffa2b9f6118 @response={4 ...


26
27
28
# File 'lib/olap/view.rb', line 26

def self.default_options= options = {}
  @@view_options.merge(options)
end

.optionsObject



30
31
32
# File 'lib/olap/view.rb', line 30

def self.options
  @@view_options
end

.request(mdx, args = {}) ⇒ Object



34
35
36
37
# File 'lib/olap/view.rb', line 34

def self.request mdx, args = {}
  response = Olap::Xmla.client.request(mdx, args)
  Olap::View::Parse.new response
end