app/models/feature_relation.rb
#
# Returns a sentence describing the nodes relationship to the "other"
# Can also pass it a block to get the other node and sentence fragment
#
Returns a sentence describing the nodes relationship to the "other"
Can also pass it a block to get the other node and sentence fragment
Returns a sentence describing the nodes relationship to the " other " Can also pass it a block to get the other node and sentence fragment
def role_of?(node, attr=:fid, &block)
    other = other_node(node)
    sentence = is_parent_node?(node) ? feature_relation_type.label : feature_relation_type.asymmetric_label
    return "#{node.send(attr)} #{sentence} #{other.send(attr)}" unless block_given?
    yield other, sentence
  end
def role_of? ( node , attr = :fid , & block ) other = other_node ( node ) sentence = is_parent_node? ( node ) ? feature_relation_type . label : feature_relation_type . asymmetric_label return "#{node.send(attr)} #{sentence} #{other.send(attr)}" unless block_given? yield other , sentence end
Returns a sentence describing the nodes relationship to the "other"
Can also pass it a block to get the other node and sentence fragment
Returns a sentence describing the nodes relationship to the " other " Can also pass it a block to get the other node and sentence fragment
# yield the other node along with the sentence fragments
node
<not_specific>
attr
<not_specific>
block
<not_specific>