Method: ActiveFacts::API::TypeInheritanceFactType#initialize
- Defined in:
- lib/activefacts/api/fact_type.rb
#initialize(supertype, subtype) ⇒ TypeInheritanceFactType
Returns a new instance of TypeInheritanceFactType.
32 33 34 35 36 37 38 |
# File 'lib/activefacts/api/fact_type.rb', line 32 def initialize(supertype, subtype) super() # The supertype role is not mandatory, but the subtype role is. Both are unique. @supertype_role = Role.new(self, supertype, subtype.name.gsub(/.*::/,'').to_sym, false, true) @subtype_role = Role.new(self, subtype, supertype.name.gsub(/.*::/,'').to_sym, true, true) end |