Class: ActiveFacts::Metamodel::Step
- Inherits:
-
Object
- Object
- ActiveFacts::Metamodel::Step
- Defined in:
- lib/activefacts/vocabulary/metamodel.rb,
lib/activefacts/vocabulary/extensions.rb
Instance Method Summary collapse
- #all_play ⇒ Object
- #describe ⇒ Object
- #external_fact_type ⇒ Object
- #is_objectification_step ⇒ Object
- #is_unary_step ⇒ Object
Instance Method Details
#all_play ⇒ Object
737 738 739 |
# File 'lib/activefacts/vocabulary/extensions.rb', line 737 def all_play [input_play, output_play].uniq + all_incidental_play.to_a end |
#describe ⇒ Object
717 718 719 720 721 722 723 724 725 726 |
# File 'lib/activefacts/vocabulary/extensions.rb', line 717 def describe "Step " + "#{is_optional ? 'maybe ' : ''}" + (is_unary_step ? '(unary) ' : "from #{input_play.describe} ") + "#{is_disallowed ? 'not ' : ''}" + "to #{output_play.describe} " + "over " + (is_objectification_step ? 'objectification ' : '') + "'#{fact_type.default_reading}'" end |
#external_fact_type ⇒ Object
741 742 743 |
# File 'lib/activefacts/vocabulary/extensions.rb', line 741 def external_fact_type fact_type.is_a?(LinkFactType) ? fact_type.role.fact_type : fact_type end |
#is_objectification_step ⇒ Object
733 734 735 |
# File 'lib/activefacts/vocabulary/extensions.rb', line 733 def is_objectification_step fact_type.is_a?(LinkFactType) end |
#is_unary_step ⇒ Object
728 729 730 731 |
# File 'lib/activefacts/vocabulary/extensions.rb', line 728 def is_unary_step # Preserve this in case we have to use a real variable for the phantom input_play == output_play end |