lib/ripe/library.rb
def find(comp, filename)
        search = paths.map do |path|
          file = "#{path}/#{comp}s/#{filename}"
          (File.exists? file) ? file : nil
        end

        search.compact.first
      end
##
# Search throughout the library for a task or workflow component by the
# name of +handle+.  When there is more than one match, give precendence to
# component whose path is declared first.
#
# @param comp [Symbol] Type of component: either +:workflow+ or
#   +:task+.
# @param filename [String] Filename of component
# @return [String, nil] Full path of the component if found, and +nil+
#   otherwise.
Search throughout the library for a task or workflow component by the
name of +handle+.  When there is more than one match, give precendence to
component whose path is declared first.
Search throughout the library for a task or workflow component by the name of + handle + . When there is more than one match give precendence to component whose path is declared first .
def find(comp, filename)
        search = paths.map do |path|
          file = "#{path}/#{comp}s/#{filename}"
          (File.exists? file) ? file : nil
        end
        search.compact.first
      end
def find ( comp , filename ) search = paths . map do | path | file = "#{path}/#{comp}s/#{filename}" ( File . exists? file ) ? file : nil end search . compact . first end
Search throughout the library for a task or workflow component by the
name of +handle+.
Search throughout the library for a task or workflow component by the name of + handle + .
Full path of the component if found, and +nil+ otherwise.
Full path of the component if found and + nil + otherwise .
String, nil
comp
Type of component: either +:workflow+ or +:task+.
Type of component : either + : workflow + or + : task + .
filename
Filename of component
Filename of component