Module: RTM::Axes::Strings
- Defined in:
- lib/rtm/axes/strings.rb
Class Method Summary collapse
Instance Method Summary collapse
- #result ⇒ Object (also: #tmapi)
-
#reverse_atomify ⇒ Object
Returns all Names and Occurrences which have one of these Strings as data value.
-
#reverse_indicators ⇒ Object
Returns all Topics which have one of these Strings as indicator (subject identifier) only if such Topics exist.
-
#reverse_item ⇒ Object
Returns all Topics which have one of these Strings as item identifer only if such Topics exist.
-
#reverse_locators ⇒ Object
Returns all Topics which have one of these Strings as subject locator only if such Topics exist.
Class Method Details
.extended(k) ⇒ Object
7 8 9 |
# File 'lib/rtm/axes/strings.rb', line 7 def self.extended(k) k.extend ArrayProxy end |
Instance Method Details
#result ⇒ Object Also known as: tmapi
11 12 13 |
# File 'lib/rtm/axes/strings.rb', line 11 def result self.map{|i| i.construct} end |
#reverse_atomify ⇒ Object
Returns all Names and Occurrences which have one of these Strings as data value. If one String is found as value of a Variant, the parent Name is returned.
The result may be empty.
:call-seq:
reverse_atomify -> Array of Names and Occurrences
27 28 29 30 31 32 |
# File 'lib/rtm/axes/strings.rb', line 27 def reverse_atomify _res = self.inject([]){|all,containee| all << containee.send(:reverse_atomify)}.flatten ### NO UNIQUE NEEDED _res = _res.extend(Characteristics) _res end |
#reverse_indicators ⇒ Object
Returns all Topics which have one of these Strings as indicator (subject identifier) only if such Topics exist.
The result may be empty.
:call-seq:
reverse_indicators -> Array of Topics
44 45 46 47 48 49 50 |
# File 'lib/rtm/axes/strings.rb', line 44 def reverse_indicators _res = self.inject([]){|all,containee| all << containee.send(:reverse_indicators)}.flatten ### NO UNIQUE _res = _res.select{|i| i} #reject nil _res = _res.extend(Topics) _res end |
#reverse_item ⇒ Object
Returns all Topics which have one of these Strings as item identifer only if such Topics exist.
The result may be empty.
:call-seq:
reverse_item -> Array of Topics
62 63 64 65 66 67 |
# File 'lib/rtm/axes/strings.rb', line 62 def reverse_item _res = self.inject([]){|all,containee| all << containee.send(:reverse_item)}.flatten _res = _res.select{|i| i} #reject nil _res = _res.extend(Topics) _res end |
#reverse_locators ⇒ Object
Returns all Topics which have one of these Strings as subject locator only if such Topics exist.
The result may be empty.
:call-seq:
reverse_locators -> Array of Topics
79 80 81 82 83 84 |
# File 'lib/rtm/axes/strings.rb', line 79 def reverse_locators _res = self.inject([]){|all,containee| all << containee.send(:reverse_locators)}.flatten _res = _res.select{|i| i} #reject nil _res = _res.extend(Topics) _res end |