Module: RTM::Sugar::Typed::Types
- Defined in:
- lib/rtm/sugar/typed/types.rb
Instance Method Summary collapse
-
#transitive_types ⇒ Object
Returns the type and the transitive supertypes of this type of this typed construct (occurrence, role, association or name) as Array.
-
#types ⇒ Object
Returns the type of this typed construct (occurrence, role, association or name) as Array.
Instance Method Details
#transitive_types ⇒ Object
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 '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 |
#types ⇒ Object
Returns the type of this typed construct (occurrence, role, association or name) as Array.
:call-seq:
types -> Array of Topics
15 16 17 |
# File 'lib/rtm/sugar/typed/types.rb', line 15 def types Array.new(type) end |