app/models/run.rb
# transform a_net to set of arrows
transform a_net to set of arrows
transform a_net to set of arrows
def a_net_to_arrows(a_net)
      a_net.blank? and return
      if a_net.is_a? Array 
        a_net.inject([]) do |sum, g| 
          element = a_net_to_arrows(g)
          element and sum += element
          sum
        end.uniq 
      else
        a_net.is_a?(String) or fail "'#{a_net}' should be String"
        parse_elem_list_to_arrows(parse_a_net_to_elem_list(a_net).first)
      end
    end
def a_net_to_arrows ( a_net ) a_net . blank? and return if a_net . is_a? Array a_net . inject ( [ ] ) do | sum , g | element = a_net_to_arrows ( g ) element and sum += element sum end . uniq else a_net . is_a? ( String ) or fail "'#{a_net}' should be String" parse_elem_list_to_arrows ( parse_a_net_to_elem_list ( a_net ) . first ) end end
transform a_net to set of arrows
transform a_net to set of arrows
a_net
<not_specific>