Module: RTM::Axes::Strings
- Defined in:
- rtm/lib/rtm/axes/strings.rb,
rtm/spec/rtm/axes/strings_spec.rb
Class Method Summary
Instance Method Summary
- - (Object) result (also: #tmapi)
-
- (Object) reverse_atomify
Returns all Names and Occurrences which have one of these Strings as data value.
-
- (Object) reverse_indicators
Returns all Topics which have one of these Strings as indicator (subject identifier) only if such Topics exist.
-
- (Object) reverse_item
Returns all Topics which have one of these Strings as item identifer only if such Topics exist.
-
- (Object) reverse_locators
Returns all Topics which have one of these Strings as subject locator only if such Topics exist.
Class Method Details
+ (Object) extended(k)
7 8 9 |
# File 'rtm/lib/rtm/axes/strings.rb', line 7 def self.extended(k) k.extend ArrayProxy end |
Instance Method Details
- (Object) result Also known as: tmapi
11 12 13 |
# File 'rtm/lib/rtm/axes/strings.rb', line 11 def result self.map{|i| i.construct} end |
- (Object) reverse_atomify
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 'rtm/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 |
- (Object) reverse_indicators
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 'rtm/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 |
- (Object) reverse_item
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 'rtm/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 |
- (Object) reverse_locators
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 'rtm/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 |