Class: ReFe::Database
- Inherits:
-
Object
- Object
- ReFe::Database
- Includes:
- FileUtils
- Defined in:
- lib/refe/database.rb
Instance Method Summary collapse
-
#class_document ⇒ Object
facades.
- #function_document ⇒ Object
- #function_source ⇒ Object
- #inheritance_graph ⇒ Object
-
#initialize(rootdir = nil, init = false) ⇒ Database
constructor
A new instance of Database.
- #method_comp_file ⇒ Object
- #method_document ⇒ Object
- #mf_relation ⇒ Object
Methods included from FileUtils
Constructor Details
#initialize(rootdir = nil, init = false) ⇒ Database
Returns a new instance of Database.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/refe/database.rb', line 35 def initialize( rootdir = nil, init = false ) @init = init if rootdir @rootdir = rootdir elsif ENV['REFE_DATA_DIR'] @rootdir = ENV['REFE_DATA_DIR'] elsif defined?(REFE_DATA_DIR) @rootdir = REFE_DATA_DIR else raise ArgumentError, 'ReFe database directory not given' end isdbdir @rootdir @class_document_dbm = nil @class_document_comptable = nil @method_document_dbm = nil @method_document_comptable = nil @mf_relation_dbm = nil @mf_relation_comptable = nil @function_document_dbm = nil @function_document_comptable = nil @function_source_dbm = nil @function_source_comptable = nil end |
Instance Method Details
#class_document ⇒ Object
facades
64 65 66 67 |
# File 'lib/refe/database.rb', line 64 def class_document ClassTable.new(class_document_dbm(), class_document_comptable()) end |
#function_document ⇒ Object
81 82 83 84 |
# File 'lib/refe/database.rb', line 81 def function_document FunctionTable.new(function_document_dbm(), function_document_comptable()) end |
#function_source ⇒ Object
86 87 88 89 |
# File 'lib/refe/database.rb', line 86 def function_source FunctionTable.new(function_source_dbm(), function_source_comptable()) end |
#inheritance_graph ⇒ Object
91 92 93 |
# File 'lib/refe/database.rb', line 91 def inheritance_graph InheritanceGraph.parse(isdbfile(@rootdir + '/inheritance_graph')) end |
#method_comp_file ⇒ Object
119 120 121 |
# File 'lib/refe/database.rb', line 119 def method_comp_file isdbfile(@rootdir + '/method_document_comp') end |
#method_document ⇒ Object
69 70 71 72 |
# File 'lib/refe/database.rb', line 69 def method_document MethodTable.new(method_document_dbm(), method_document_comptable()) end |
#mf_relation ⇒ Object
74 75 76 77 78 79 |
# File 'lib/refe/database.rb', line 74 def mf_relation MFRelationTable.new(method_document(), mf_relation_dbm(), mf_relation_comptable(), function_source()) end |