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

#as_cqlObject



1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
# File 'lib/activefacts/vocabulary/extensions.rb', line 1320

def as_cql
  ' (' +
  ( 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.iso8601.inspect+' ' : '') +
      'by '
      agreement.all_context_agreed_by.map do |acab|
        acab.agent.agent_name+', '
      end.join('')
    else
      ''
    end
  ) +
  ')'
end

#verbalise(context = nil) ⇒ Object



1316
1317
1318
# File 'lib/activefacts/vocabulary/extensions.rb', line 1316

def verbalise(context=nil)
  as_cql
end