Sha256: 8027ae7609cf9ca4a310241356a1601c9847a497ec01d606782122555ed53fcd

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/module/introspection'
require 'active_support/core_ext/hash/deep_dup'
require 'active_support/core_ext/hash/keys'
require 'active_support/core_ext/hash/conversions'
require 'builder'
require 'multi_json'
require 'active_attr'

require 'rubiks/version'

module ::Rubiks
  autoload :Cube, 'rubiks/cube'
  autoload :Hierarchy, 'rubiks/hierarchy'
  autoload :Dimension, 'rubiks/dimension'
  autoload :Schema, 'rubiks/schema'
  autoload :Level, 'rubiks/level'
  autoload :NamedObject, 'rubiks/named_object'
  autoload :Measure, 'rubiks/measure'
  autoload :CalculatedMeasure, 'rubiks/calculated_measure'

  def self.connection
    Rubiks::Mondrian.connection
  end

  def self.clear_cache
    ::Rubiks::Mondrian.flush_schema_cache
    ::Rubiks::Mondrian.reset_connection
  end

  def self.execute(query)
    ::Rubiks::Mondrian.connection.execute(query)
  end

  def self.schema
    @schema ||= ::Rubiks::Schema.default
  end

  def self.table_prefix
    @table_prefix ||= 'view_'
  end

  def self.table_prefix=(prefix)
    @table_prefix = prefix
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubiks-0.1.8 lib/rubiks.rb
rubiks-0.1.7 lib/rubiks.rb