def method_missing(name)
      name = name.to_s
      resource = @resources[name]
      if resource.nil?
        # Find the name using the same ruby_name replacement semantics as when
        # we set up the @resources hash
        name = Heroics.ruby_name(name)
        resource = @resources[name]
        if resource.nil?
          raise NoMethodError.new("undefined method `#{name}' for #{to_s}")
        end
      end
      resource
    end
def method_missing(name)
      name = name.to_s
      resource = @resources[name]
      if resource.nil?
        # Find the name using the same ruby_name replacement semantics as when
        # we set up the @resources hash
        name = Heroics.ruby_name(name)
        resource = @resources[name]
        if resource.nil?
          raise NoMethodError.new("undefined method `#{name}' for #{to_s}")
        end
      end
      resource
    end
Instantiate an HTTP client.

 @param resources [Hash<String,Resource>] A hash that maps method names
   to resources.
 @param url [String] The URL used by this client.
 Find a resource.

 @param name [String] The name of the resource to find.
 @raise [NoMethodError] Raised if the name doesn't match a known resource.
 @return [Resource] The resource matching the name.