Class: ActiveFacts::Metamodel::Indicator
- Inherits:
-
Component
- Object
- Component
- ActiveFacts::Metamodel::Indicator
show all
- Defined in:
- lib/activefacts/metamodel/metamodel.rb,
lib/activefacts/metamodel/extensions.rb
Constant Summary
Constants inherited
from Component
Component::RANK_DISCRIMINATOR, Component::RANK_FOREIGN, Component::RANK_IDENT, Component::RANK_INDICATOR, Component::RANK_INJECTION, Component::RANK_MANDATORY, Component::RANK_MULTIPLE, Component::RANK_NON_MANDATORY, Component::RANK_SCOPING, Component::RANK_SUBTYPE, Component::RANK_SUPER, Component::RANK_SURROGATE, Component::RANK_VALUE
Instance Method Summary
collapse
Methods inherited from Component
#data_type, #depth, #fork_to_new_parent, #in_foreign_key, #in_primary_index, #is_auto_assigned, #leaves, #narrow_value_constraint, #parent_entity_type, #path, #path_mandatory, #primary_index_components, #rank_key, #rank_kind, #rank_path, #root, #uncache_rank_key
Instance Method Details
#all_role ⇒ Object
1995
1996
1997
|
# File 'lib/activefacts/metamodel/extensions.rb', line 1995
def all_role
[role, role.base_role].uniq
end
|
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
|
# File 'lib/activefacts/metamodel/extensions.rb', line 2003
def
c = parent.
if c != ''
c +' that '
elsif name =~ /\b#{parent.name}\b/
''
else
parent.name+' '
end + name
end
|
#inspect ⇒ Object
1987
1988
1989
|
# File 'lib/activefacts/metamodel/extensions.rb', line 1987
def inspect
"#{self.class.basename} #{role.fact_type.default_reading.inspect}"
end
|
#is_mandatory ⇒ Object
1999
2000
2001
|
# File 'lib/activefacts/metamodel/extensions.rb', line 1999
def is_mandatory
false
end
|
#show_trace ⇒ Object
1991
1992
1993
|
# File 'lib/activefacts/metamodel/extensions.rb', line 1991
def show_trace
trace :composition, "#{ordinal ? "#{ordinal}: " : ''}#{inspect} #{name ? "(as #{name.inspect})" : ''}"
end
|