Module: Pod4

Defined in:
lib/pod4.rb,
lib/pod4/alert.rb,
lib/pod4/model.rb,
lib/pod4/param.rb,
lib/pod4/errors.rb,
lib/pod4/version.rb,
lib/pod4/metaxing.rb,
lib/pod4/interface.rb,
lib/pod4/sql_helper.rb,
lib/pod4/basic_model.rb,
lib/pod4/typecasting.rb,
lib/pod4/pg_interface.rb,
lib/pod4/tds_interface.rb,
lib/pod4/null_interface.rb,
lib/pod4/sequel_interface.rb,
lib/pod4/nebulous_interface.rb

Overview

Pod4, which:

  • will gather data from absolutely anything. Nebulous, Sequel, Pg, TinyTds, whatever. Add your own on the fly.

  • will allow you to define models which are genuinely represent the data your way, not the way the data source sees it.

  • is hopefully simple and clean; just a very light helper layer with the absolute minimum of magic or surprises for the developer.

For more information:

  • There is a short tutorial in the readme.

  • you should look at the contract Pod4 makes with its callers – you should find all that you need in the classes Pod4::Interface and Pod4::Model.

  • Or, read the tests, of course.

Defined Under Namespace

Modules: Metaxing, Param, SQLHelper, TypeCasting Classes: Alert, BasicModel, CantContinue, DatabaseError, Interface, Model, NebulousInterface, NotImplemented, NullInterface, PgInterface, Pod4Error, SequelInterface, TdsInterface, ValidationError

Constant Summary collapse

VERSION =
'0.8.0'

Class Method Summary collapse

Class Method Details

.loggerObject

Return a logger instance if you set one using set_logger. Otherwise, return a logger instance that points to a DevNull IO object.



48
49
50
# File 'lib/pod4.rb', line 48

def self.logger
  Param.get(:logger) || Logger.new( DevNull.new )
end

.set_logger(instance) ⇒ Object

If you have a logger instance, set it here to have Pod4 models and interfaces write to it.



39
40
41
# File 'lib/pod4.rb', line 39

def self.set_logger(instance)
  Param.set(:logger, instance)
end