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.1.0"
@@default_view_options =
{
    no_data: "Not enough data to display",
    undefined: "-",
    total: "Total"
}

Class Method Summary collapse

Class Method Details

.default_view_options=(options = {}) ⇒ Object

Configure the default view options Can be optionally used to setup options in one place in application,

Example:

>> Olap::View.default_view_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 ...


24
25
26
# File 'lib/olap/view.rb', line 24

def self.default_view_options= options = {}
  @@default_view_options.merge!(options)
end

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



32
33
34
35
# File 'lib/olap/view.rb', line 32

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

.view_optionsObject



28
29
30
# File 'lib/olap/view.rb', line 28

def self.view_options
  @@default_view_options
end