Class: ActiveFacts::Metamodel::ContextNote

Inherits:
Object
  • Object
show all
Defined in:
lib/activefacts/vocabulary/metamodel.rb,
lib/activefacts/vocabulary/extensions.rb

Instance Method Summary collapse

Instance Method Details

#verbalise(context = nil) ⇒ Object



1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
# File 'lib/activefacts/vocabulary/extensions.rb', line 1062

def verbalise(context=nil)
	' (' +
	( if all_context_according_to
	    'according to '
	    all_context_according_to.map do |act|
 act.agent.agent_name+', '
	    end.join('')
	  end
	) +
	context_note_kind.gsub(/_/, ' ') +
	' ' +
	discussion +
	( if agreement
	    ', as agreed ' +
	    (agreement.date ? ' on '+agreement.date+' ' : '') +
	    'by '
	    agreement.all_context_agreed_by.map do |acab|
 acab.agent.agent_name+', '
	    end.join('')
	  else
	    ''
	  end
	) +
	')'
end