Module: TM

Defined in:
lib/rtm/rails.rb

Overview

The module TM can be used to easily access the TopicMaps used in an application. It uses a TopicMapManager and provides access to a TopicMap by using the Hash access method: TM[] or TM.[] or bla or [](*args). TopicMaps can be configured in the config/topicmaps.yaml file.

Constant Summary collapse

Manager =
RTM::TopicMapManager.new

Class Method Summary collapse

Class Method Details

.[](*args) ⇒ RTM::TopicMap

Returns a TopicMap

Parameters:

  • identifier (Types)

    of the TopicMap to return.

Returns:

  • (RTM::TopicMap)

    with the given identifier



274
275
276
277
278
279
280
# File 'lib/rtm/rails.rb', line 274

def self.[](*args)
  if args.size == 0
    Manager.topic_maps
  else
    Manager[*args]
  end
end