Module: DataModeler

Defined in:
lib/data_modeler/support.rb

Overview

Main gem module

Defined Under Namespace

Modules: Models Classes: Base, Dataset, DatasetGen

Constant Summary collapse

VERSION =

Version number

"0.3.4"

Class Method Summary collapse

Class Method Details

.id_from_filename(filename = __FILE__) ⇒ String

Note:

convenient method to have available in the config

Returns a standardized String ID from a (sequentially named) file

Returns:

  • (String)


15
16
17
# File 'lib/data_modeler/support.rb', line 15

def self.id_from_filename filename=__FILE__
  format "%02d", Integer(filename[/_(\d+).rb$/,1])
end

.new(config) ⇒ Base

Returns an instance of the Base class

Parameters:

  • config (Hash)

    Base class configuration

Returns:

  • (Base)

    initialized instance of Base class



22
23
24
# File 'lib/data_modeler/support.rb', line 22

def self.new config
  DataModeler::Base.new config
end