Module: RTM::Navigation::Name
- Defined in:
- rtm/spec/rtm/navigation/name_spec.rb,
rtm/lib/rtm/navigation/name/atomify.rb,
rtm/spec/rtm/navigation/name/atomify_spec.rb,
rtm/lib/rtm/navigation/name/characteristics.rb,
rtm/spec/rtm/navigation/name/characteristics_spec.rb
Instance Method Summary
-
- (Object) atomify
Returns the atomic value of the Characteristic (Name/Occurrence).
-
- (Object) reverse_characteristics(type = :any)
Returns the Topic this Characteristic (Name/Occurrence) belongs to.
Instance Method Details
- (Object) atomify
Returns the atomic value of the Characteristic (Name/Occurrence).
:call-seq:
atomify -> String
13 14 15 |
# File 'rtm/lib/rtm/navigation/name/atomify.rb', line 13 def atomify value end |
- (Object) reverse_characteristics(type = :any)
Returns the Topic this Characteristic (Name/Occurrence) belongs to. The optional argument identifier filters the Characteristic for its type. If the type does not match, nil is returned.
The identifier may be a topic reference.
:call-seq:
reverse_characteristics -> Topic reverse_characteristics(identifier) -> Topic or nil
19 20 21 22 23 24 25 26 27 28 29 |
# File 'rtm/lib/rtm/navigation/name/characteristics.rb', line 19 def reverse_characteristics(type=:any) return parent if type == :any _topic = topic_map.get(type) return nil unless _topic #filter the Name/Occurrence for its type: if _topic == self.type return parent else return nil end end |