class ActiveFacts::Metamodel::Step

Public Instance Methods

describe() click to toggle source
# File lib/activefacts/metamodel/extensions.rb, line 1272
def describe
  "Step " +
    "#{is_optional ? 'maybe ' : ''}" +
    (is_unary_step ? '(unary) ' : "from #{input_play.describe} ") +
    "#{is_disallowed ? 'not ' : ''}" +
    "to #{output_plays.map(&:describe)*', '}" +
    (objectification_variable ? ", objectified as #{objectification_variable.describe}" : '') +
    " '#{fact_type.default_reading}'"
end
input_play() click to toggle source
# File lib/activefacts/metamodel/extensions.rb, line 1282
def input_play
  all_play.detect{|p| p.is_input}
end
is_objectification_step() click to toggle source
# File lib/activefacts/metamodel/extensions.rb, line 1295
def is_objectification_step
  !!objectification_variable
end
is_unary_step() click to toggle source
# File lib/activefacts/metamodel/extensions.rb, line 1290
def is_unary_step
  # Preserve this in case we have to use a real variable for the phantom
  all_play.size == 1
end
output_plays() click to toggle source
# File lib/activefacts/metamodel/extensions.rb, line 1286
def output_plays
  all_play.reject{|p| p.is_input}
end