Module: RTM::Sugar::Typed::Types
- Defined in:
- rtm/lib/rtm/sugar/typed/types.rb,
rtm/spec/rtm/sugar/typed/types_spec.rb
Instance Method Summary
-
- (Object) transitive_types
Returns the type and the transitive supertypes of this type of this typed construct (occurrence, role, association or name) as Array.
-
- (Object) types
Returns the type of this typed construct (occurrence, role, association or name) as Array.
Instance Method Details
- (Object) transitive_types
Returns the type and the transitive supertypes of this type of this typed construct (occurrence, role, association or name) as Array.
:call-seq:
transitive_types -> Array of Topics
26 27 28 29 30 31 32 33 34 |
# File 'rtm/lib/rtm/sugar/typed/types.rb', line 26 def transitive_types sup_types = type.transitive_supertypes if sup_types.empty? sup_types = types else sup_types << type unless sup_types.include?(type) end return sup_types end |
- (Object) types
Returns the type of this typed construct (occurrence, role, association or name) as Array.
:call-seq:
types -> Array of Topics
15 16 17 |
# File 'rtm/lib/rtm/sugar/typed/types.rb', line 15 def types Array.new(type) end |