Class: Chicago::Schema::Builders::FactBuilder

Inherits:
TableBuilder
  • Object
show all
Defined in:
lib/chicago/schema/builders/fact_builder.rb

Overview

An API to build facts via a DSL-like syntax.

You shouldn’t need to initialize a FactBuilder yourself.

Instance Attribute Summary

Attributes inherited from TableBuilder

#column_builder

Instance Method Summary collapse

Methods inherited from TableBuilder

#initialize

Constructor Details

This class inherits a constructor from Chicago::Schema::Builders::TableBuilder

Instance Method Details

#build(name, &block) ⇒ Object

Builds a Fact, given the name of the fact and a definition block.

Refer to the protected methods in this block to see how to define attributes of the fact.



16
17
18
19
20
21
22
23
# File 'lib/chicago/schema/builders/fact_builder.rb', line 16

def build(name, &block)
  @options = {
    :dimensions => [],
    :measures => [],
    :degenerate_dimensions => []
  }
  super Chicago::Schema::Fact, name, &block
end