lib/heathen/task.rb
# Finds a registered task suitable for the given action and mime type (note, the first
# suitable one will be selected).
Finds a registered task suitable for the given action and mime type (note, the first
suitable one will be selected).
Finds a registered task suitable for the given action and mime type ( note the first suitable one will be selected ) .
def find action, mime_type
        tasks.each do |k,task|
          if task[:action] == action && mime_type =~ %r[#{task[:mime_type_pattern]}]
            return task
          end
        end
        raise TaskNotFound.new action, mime_type
      end
def find action , mime_type tasks . each do | k , task | if task [ :action ] == action && mime_type =~ %r[ #{ task [ :mime_type_pattern ] } ] return task end end raise TaskNotFound . new action , mime_type end
Finds a registered task suitable for the given action and mime type (note, the first
suitable one will be selected).
Finds a registered task suitable for the given action and mime type ( note the first suitable one will be selected ) .
action
<not_specific>
mime_type
<not_specific>