app/models/feature_relation.rb
#
# Returns the type of role a node plays within this relation
#
Returns the type of role a node plays within this relation
Returns the type of role a node plays within this relation
def role_type(node)
    raise 'Invalid node value' if node.class != Feature
    return self.role unless self.role.to_s.empty?
    self.child_node?(node) ? 'child' : 'parent'
  end
def role_type ( node ) raise 'Invalid node value' if node . class != Feature return self . role unless self . role . to_s . empty? self . child_node? ( node ) ? 'child' : 'parent' end
Returns the type of role a node plays within this relation
Returns the type of role a node plays within this relation
node
<not_specific>