class ADSL::DS::DSClass
Public Class Methods
common_supertype(classes)
click to toggle source
# File lib/adsl/ds/data_store_spec.rb, line 69 def self.common_supertype(classes) types = classes.uniq types.delete nil while types.length > 1 type1 = types.pop type2 = types.pop if type1.superclass_of? type2 types << type2 elsif type2.superclass_of? type1 types << type1 else raise ADSLError, "Object sets are not of compatible types: #{classes.map { |c| c.name }.join(", ")}" end end types.first end
Public Instance Methods
[](variable)
click to toggle source
# File lib/adsl/spass/spass_ds_extensions.rb, line 155 def [](variable) @type_pred[variable] end
superclass_of?(other_class)
click to toggle source
# File lib/adsl/ds/data_store_spec.rb, line 61 def superclass_of?(other_class) until other_class.nil? return true if other_class == self other_class = other_class.parent end return false end
to_s()
click to toggle source
# File lib/adsl/ds/data_store_spec.rb, line 57 def to_s @name end
translate(translation)
click to toggle source
# File lib/adsl/spass/spass_ds_extensions.rb, line 159 def translate(translation) @type_pred = translation.create_predicate "of_#{@name}_type", 1 end