lib/activefacts/generator/summary.rb in activefacts-compositions-1.9.22 vs lib/activefacts/generator/summary.rb in activefacts-compositions-1.9.23
- old
+ new
@@ -7,10 +7,34 @@
require "activefacts/compositions/names"
require "activefacts/compositions/constraints"
require "activefacts/generator"
module ActiveFacts
+ module Generators
+ class Summary
+ def self.options
+ {
+ }
+ end
+
+ def self.compatibility
+ [1, nil]
+ end
+
+ def initialize constellation, composition, options = {}
+ @constellation = constellation
+ @composition = composition
+ @options = options
+ end
+
+ def generate
+ @composition.summary
+ end
+ end
+ publish_generator Summary, "Succinctly display the full structure of any composition"
+ end
+
module Metamodel
class Composition
def summary
classify_constraints
@@ -95,26 +119,7 @@
end.sort
)*''
end
end
- end
-
- module Generators
- class Summary
- def self.options
- {
- }
- end
-
- def initialize composition, options = {}
- @composition = composition
- @options = options
- end
-
- def generate
- @composition.summary
- end
- end
- publish_generator Summary, "Succinctly display the full structure of any composition"
end
end