ruby-win32/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb
def create(name, options = {})
      last_slash = name.rindex("/")
      category = name[0 ... last_slash]
      plugin = name[last_slash .. -1]

      map = @plugins[category]
      if not map
        raise "Plugin category #{category} does not exist"
      elsif not map.has_key? plugin
        raise "Plugin #{plugin} does not exist in category #{category}"
      else
        map[plugin].new(options)
      end
    end
# Resolves the given name (should include /category/name) to
# find the plugin class and create an instance.  You can
# pass a second hash option that is then given to the Plugin 
# to configure it.
Resolves the given name (should include /category/name) to
find the plugin class and create an instance.  You can
pass a second hash option that is then given to the Plugin
to configure it.
Resolves the given name ( should include / category / name ) to find the plugin class and create an instance . You can pass a second hash option that is then given to the Plugin to configure it .
def create(name, options = {})
      last_slash = name.rindex("/")
      category = name[0 ... last_slash]
      plugin = name[last_slash .. -1]
      map = @plugins[category]
      if not map
        raise "Plugin category #{category} does not exist"
      elsif not map.has_key? plugin
        raise "Plugin #{plugin} does not exist in category #{category}"
      else
        map[plugin].new(options)
      end
    end
def create ( name , options = { } ) last_slash = name . rindex ( "/" ) category = name [ 0 ... last_slash ] plugin = name [ last_slash .. - 1 ] map = @plugins [ category ] if not map raise "Plugin category #{category} does not exist" elsif not map . has_key? plugin raise "Plugin #{plugin} does not exist in category #{category}" else map [ plugin ] . new ( options ) end end
Resolves the given name (should include /category/name) to
find the plugin class and create an instance.
Resolves the given name ( should include / category / name ) to find the plugin class and create an instance .
name
options