Class: ActiveFacts::Metamodel::Join

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

Instance Method Summary collapse

Instance Method Details

#column_name(joiner = '-') ⇒ Object



62
63
64
# File 'lib/activefacts/vocabulary/extensions.rb', line 62

def column_name(joiner = '-')
  concept == input_role.concept ? input_role.preferred_reference.role_name(joiner) : Array(concept.name)
end

#describeObject



66
67
68
69
70
# File 'lib/activefacts/vocabulary/extensions.rb', line 66

def describe
  "#{input_role.fact_type.describe(input_role)}->" +
    concept.name +
    (output_role ? "->#{output_role.fact_type.describe(output_role)}":"")
end