Sha256: 0615a61c9f8c357bfb6787f2c41fcf437735a3e48a5c547bc1998503489b4eaa
Contents?: true
Size: 1.03 KB
Versions: 4
Compression:
Stored size: 1.03 KB
Contents
# Define the way to generate a textual representation of the system class Phenomenal::Viewer::Textual attr_reader :manager, :rmanager def initialize() @manager=Phenomenal::Manager.instance @rmanager=Phenomenal::RelationshipsManager.instance end def generate() str="" offset=" " self.manager.contexts.each do |key,context| if context.is_a?(Phenomenal::Feature) type="Feature" str=str+"#{type}: #{context.to_s} \n" context.relationships.each do |relationship| if relationship.is_a?(Phenomenal::Implication) relation="=>" elsif relationship.is_a?(Phenomenal::Suggestion) relation="->" elsif relationship.is_a?(Phenomenal::Requirement) relation="=<" else relation="??" end str=str+"#{offset} #{relationship.source.to_s} #{relation} #{relationship.target.to_s} \n" end else type="Context" str=str+"#{type}: #{context.to_s} \n" end end str end end
Version data entries
4 entries across 4 versions & 1 rubygems