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/tweaking.rb,
lib/pod4/interface.rb,
lib/pod4/connection.rb,
lib/pod4/encrypting.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/connection_pool.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: Encrypting, Metaxing, Param, SQLHelper, Tweaking, TypeCasting Classes: Alert, BasicModel, CantContinue, Connection, ConnectionPool, DatabaseError, Interface, Model, NebulousInterface, NotImplemented, NullInterface, PgInterface, Pod4Error, PoolTimeout, SequelInterface, TdsInterface, ValidationError, WeakError

Constant Summary collapse

VERSION =
'1.0.1'

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.



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

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.



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

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