Module: Sheetah::AttributeType Abstract

Included in:
Sheetah::AttributeTypes::Scalar
Defined in:
lib/sheetah/attribute_types.rb

Overview

This module is abstract.

It only exists to document the interface implemented by the different classes of AttributeTypes.

The minimal interface of an Attribute type.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.buildObject

A smarter version of ‘#initialize`, that will always return a frozen instance of the type, with optional syntactic sugar for its arguments compared to `#initialize`.



7
# File 'lib/sheetah/attribute_types.rb', line 7

def self.build(*); end

Instance Method Details

#compile(container) ⇒ Types::Type

Given a type container, return the actual, usable type for the attribute.

Parameters:

Returns:



12
# File 'lib/sheetah/attribute_types.rb', line 12

def compile(container); end

#each_column(&block) ⇒ self #each_columnEnumerator

Enumerate the columns (one or more) that may compose the attribute in the tabular document.

Overloads:

  • #each_column(&block) ⇒ self

    Returns:

    • (self)
  • #each_columnEnumerator

    Returns:

    • (Enumerator)

Yield Parameters:

  • index (Integer, nil)

    If there is only one column involved, then ‘index` will be `nil`. Otherwise, `index` will start at `0` and increase by `1` at each step.

  • required (Boolean)

    Whether the column must be present in the tabular document.



27
# File 'lib/sheetah/attribute_types.rb', line 27

def each_column; end