Module: Rfm

Extended by:
Rfm
Included in:
Rfm
Defined in:
lib/rfm/metadata/datum.rb,
lib/rfm.rb,
lib/rfm.rb,
lib/rfm/base.rb,
lib/rfm/error.rb,
lib/rfm/server.rb,
lib/rfm/record.rb,
lib/rfm/layout.rb,
lib/rfm/version.rb,
lib/rfm/database.rb,
lib/rfm/resultset.rb,
lib/rfm/metadata/field.rb,
lib/rfm/metadata/script.rb,
lib/rfm/utilities/config.rb,
lib/rfm/utilities/factory.rb,
lib/rfm/utilities/connection.rb,
lib/rfm/metadata/layout_meta.rb,
lib/rfm/utilities/sax_parser.rb,
lib/rfm/metadata/field_control.rb,
lib/rfm/metadata/resultset_meta.rb,
lib/rfm/utilities/compound_query.rb,
lib/rfm/metadata/value_list_item.rb,
lib/rfm/utilities/case_insensitive_hash.rb

Overview

The classes in this module are used internally by RFM and are not intended for outside use.

Defined Under Namespace

Modules: Config, Error, Factory, Metadata, SaxParser Classes: AuthenticationError, Base, CaseInsensitiveHash, CommunicationError, CompoundQuery, Connection, Database, Layout, ParameterError, Record, Resultset, Server

Constant Summary

PATH =
File.expand_path(File.dirname(__FILE__))
PARSER_DEFAULTS =

DEFAULT_CLASS = CaseInsensitiveHash TEMPLATE_PREFIX = File.join(File.dirname(__FILE__), 'rfm/utilities/sax/') TEMPLATES = { :fmpxmllayout => 'fmpxmllayout.yml', :fmresultset => 'fmresultset.yml', :fmpxmlresult => 'fmpxmlresult.yml', :none => nil }

{
	:default_class => CaseInsensitiveHash,
	:template_prefix => File.join(File.dirname(__FILE__), 'rfm/utilities/sax/'),
	:templates => {
		:fmpxmllayout => 'fmpxmllayout.yml',
		:fmresultset => 'fmresultset.yml',
		:fmpxmlresult => 'fmpxmlresult.yml',
		:none => nil
	}
}
VERSION_DEFAULT =
'none'
VERSION =
File.read(PATH + '/rfm/VERSION').lines.first.chomp  rescue VERSION_DEFAULT

Instance Method Summary collapse

Instance Method Details

#infoObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rfm.rb', line 42

def info
   rslt = <<-EEOOFF
     Gem name: ginjo-rfm
     Version: #{VERSION}
     ActiveModel loadable? #{begin; Gem::Specification::find_all_by_name('activemodel')[0].version.to_s; rescue Exception; false; end}
     ActiveModel loaded? #{defined?(ActiveModel) ? 'true' : 'false'}
     XML default parser: #{SaxParser::Handler.get_backend}
     Ruby: #{RUBY_VERSION}
   EEOOFF
   rslt.gsub!(/^[ \t]*/, '')
   rslt
 rescue
 	"Could not retrieve info: #{$!}"
end

#info_shortObject



57
58
59
# File 'lib/rfm.rb', line 57

def info_short
	"Using ginjo-rfm version #{::Rfm::VERSION} with #{SaxParser::Handler.get_backend}"
end

#loggerObject Also known as: log



75
76
77
# File 'lib/rfm.rb', line 75

def logger
	@@logger ||= get_config[:logger] || Logger.new(STDOUT).tap {|l| l.formatter = proc {|severity, datetime, progname, msg| "#{datetime}: Rfm-#{severity} #{msg}\n"}}
end

#logger=(obj) ⇒ Object



81
82
83
# File 'lib/rfm.rb', line 81

def logger=(obj)
	@@logger = obj
end

#modelize(*args) ⇒ Object



70
71
72
73
# File 'lib/rfm.rb', line 70

def modelize(*args)
	Rfm::Base
	Rfm::Factory.modelize(*args)
end

#models(*args) ⇒ Object



65
66
67
68
# File 'lib/rfm.rb', line 65

def models(*args)
	Rfm::Base
	Rfm::Factory.models(*args)
end