Skip to content

Commit

Permalink
Fixes some bugs with my Yard dox
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neighman committed Aug 1, 2009
1 parent 5611886 commit 6bcdd1e
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 34 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ tmp/*
TAGS
*~
.#*
pkg
pkg
.yardoc
doc
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2009 YOUR NAME
Copyright (c) 2009 Daniel Neighman

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
6 changes: 3 additions & 3 deletions lib/pancake/hooks/inheritable_inner_classes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def self.extended(base)
# class Bar < Foo::Bar; end
# end
#
# This provides a more organic inheritance where the child gets their own
# version of the inner class which is actually inherited from the parents inner class.
# The inheritance chain remains intact.
# This provides a more organic inheritance where the child gets their own
# version of the inner class which is actually inherited from the parents inner class.
# The inheritance chain remains intact.
#
# @api public
# @since 0.1.0
Expand Down
6 changes: 3 additions & 3 deletions lib/pancake/master.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class << self

# Start Pancake. This provides a full pancake stack to use inside a rack application
#
# @params [Hash] opts
# @param [Hash] opts
# @option opts [String] :root The root of the pancake stack
#
# @example Starting a pancake stack
Expand Down Expand Up @@ -54,7 +54,7 @@ def get_root(file)
# @example
# Pancake.stack_labels == [:development, :demo]
#
# This would activate middleware marked with :development or :demo or the implicit :any label
# # This would activate middleware marked with :development or :demo or the implicit :any label
#
# @return [Array<Symbol>]
# An array of labels to activate
Expand All @@ -70,7 +70,7 @@ def stack_labels

# Sets the stack labels to activate the associated middleware
#
# @params [Array<Symbol>, Symbol] An array of labels or a single label, specifying the middlewares to activate
# @param [Array<Symbol>, Symbol] An array of labels or a single label, specifying the middlewares to activate
#
# @example
# Pancake.stack_labels = [:demo, :production]
Expand Down
30 changes: 15 additions & 15 deletions lib/pancake/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class StackMiddleware < Pancake::Middleware::StackMiddleware; end

# Build a middleware stack given an application and some middleware classes
#
# @params [Object] app a rack application to wrap in the middlware list
# @params [Array<StackMiddleware>] mwares an array of StackMiddleware instances where each instance
# @param [Object] app a rack application to wrap in the middlware list
# @param [Array<StackMiddleware>] mwares an array of StackMiddleware instances where each instance
# defines a middleware to use in constructing the stack
#
# @example
Expand Down Expand Up @@ -67,9 +67,8 @@ def middlewares(*labels)
# The name of a given middleware. Each piece of middleware has a name in the stack.
# By naming middleware we can refer to it later, swap it out for a different class or even just remove it from the stack.
# @param [Hash] opts An options hash
# @option opts [Array<Symbol>] :labels
# @option opts [Array<Symbol>] :labels ([:any])
# An array of symbols, or a straight symbol that defines what stacks this middleware sould be active in
# If no label(s) are specified, the label for the middleware is :any
# @option opts [Object] :before
# Sets this middlware to be run after the middleware named. Name is either the name given to the
# middleware stack, or the Middleware class itself.
Expand All @@ -80,29 +79,29 @@ def middlewares(*labels)
# @example Declaring un-named middleware via the stack
# MyClass.stack.use(MyMiddleware)
#
# This middleware will be named MyMiddleware, and can be specified with (:before | :after) => MyMiddleware
# This middleware will be named MyMiddleware, and can be specified with (:before | :after) => MyMiddleware
#
# @example Declaring a named middleware via the stack
# MyClass.stack(:foo).use(MyMiddleware)
#
# This middleware will be named :foo and can be specified with (:before | :after) => :foo
# This middleware will be named :foo and can be specified with (:before | :after) => :foo
#
# @example Declaring a named middleware with a :before key
# MyClass.stack(:foo, :before => :bar).use(MyMiddleware)
#
# This middleware will be named :foo and will be run before the middleware named :bar
# If :bar is not run, :foo will not be run either
# This middleware will be named :foo and will be run before the middleware named :bar
# If :bar is not run, :foo will not be run either
#
# @example Declaring a named middlware with an :after key
# MyClass.stack(:foo, :after => :bar).use(MyMiddleware)
#
# This middleware will be named :foo and will be run after the middleware named :bar
# If :bar is not run, :foo will not be run either
# This middleware will be named :foo and will be run after the middleware named :bar
# If :bar is not run, :foo will not be run either
#
# @example Declaring a named middleware with some labels
# MyClass.stack(:foo, :lables => [:demo, :production, :staging]).use(MyMiddleware)
#
# This middleware will only be run when pancake is set with the :demo, :production or :staging labels
# This middleware will only be run when pancake is set with the :demo, :production or :staging labels
#
# @example A full example
# MyClass.stack(:foo, :labels => [:staging, :development], :after => :session).use(MyMiddleware)
Expand Down Expand Up @@ -166,7 +165,9 @@ class StackMiddleware
class_inheritable_reader :_central_mwares, :_mwares, :_before, :_after
@_central_mwares, @_before, @_after, @_mwares = [], {}, {}, {}

# @api private
attr_reader :middleware, :name
# @api private
attr_accessor :config, :block, :stack, :options

class << self
Expand All @@ -192,7 +193,7 @@ def reset!
# @example No Labels Specified
# MyClass::StackMiddleware.middlewares
#
# This will include all defined middlewares in the given stack
# This will include all defined middlewares in the given stack
#
# @return [Array<StackMiddleware>]
# An array of the middleware definitions to use in the order that they should be applied
Expand All @@ -217,7 +218,7 @@ def middlewares(*labels)
# @example
# MyClass::StackMiddleware.map_middleware(:foo, :production, :demo)
#
# Constructs the middleware list based on the middleware named :foo, including all :before, and :after groups
# Constructs the middleware list based on the middleware named :foo, including all :before, and :after groups
#
# @return [Array<StackMiddleware>]
# Provides an array of StackMiddleware instances in the array [<before :foo>, <:foo>, <after :foo>]
Expand Down Expand Up @@ -264,9 +265,8 @@ def [](name)
# @param [Object] name a name for this middleware definition. Usually a symbol, but could be the class.
# @param [Object] stack the stack owner of this middleware.
# @param [Hash] options an options hash. Provide labels for this middleware.
# @option options [Array] :labels
# @option options [Array] :labels ([:any])
# The labels that are associated with this middleware
# By default this is set to :any
# @option options [Object] :before A middleware name to add this middleware before
# @option options [Object] :after A middleware name to add this middleware after
#
Expand Down
22 changes: 11 additions & 11 deletions lib/pancake/paths.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def self.extended(base) #:nodoc:#
# @example Using Multiple paths:
# MyClass.push_paths(:foo, ["/path/one", "/path/two"], "**/*.rb")
#
# @exception [Pancake::NoPathsGiven] raised when an empty paths array is provided
# @raise [Pancake::NoPathsGiven] raised when an empty paths array is provided
# @author Daniel Neighman
# @since 0.1.1
# @api public
Expand All @@ -72,9 +72,9 @@ def push_paths(name, paths, glob = nil)

# Provides the directories or raw paths that are associated with a given name.
#
# @params [Symbol] name The name for the paths group
# @params [Hash] opts An options hash
# @option opts [Boolean] :invert inverts the order of the returned paths
# @param [Symbol] name The name for the paths group
# @param [Hash] opts An options hash
# @option opts [Boolean] :invert (false) inverts the order of the returned paths
#
# @example Read Directories:
# MyClass.dirs_for(:models)
Expand Down Expand Up @@ -106,7 +106,7 @@ def dirs_for(name, opts = {})
#
# @param [Symbol] name The name of the path group
# @param [Hash] opts A hash of options
# @option opts [Boolean] :invert Inverts the order of the paths
# @option opts [Boolean] :invert (false) Inverts the order of the paths
#
# @example
# MyClass.dirs_and_glob_for(:models)
Expand Down Expand Up @@ -137,7 +137,7 @@ def dirs_and_glob_for(name, opts = {})
#
# @param [Symbol] name The name of the paths group
# @param [Hash] opts An options hash
# @option opts [Boolean] :invert Inverts the order of the returned values
# @option opts [Boolean] :invert (false) Inverts the order of the returned values
#
# @example
# MyClass.paths_for(:model)
Expand Down Expand Up @@ -169,13 +169,13 @@ def paths_for(name, opts = {})
#
# @param [Symbol] name The name of the paths group
# @param [Hash] opts An options hash
# @option opts [Boolean] :invert Inverts the order of returned paths and files
# @option opts [Boolean] :invert (false) Inverts the order of returned paths and files
#
# @example
# Given the following:
# /path/one/file1.rb
# /path/one/file2.rb
# /path/two/file1.rb
# #Given the following:
# # /path/one/file1.rb
# # /path/one/file2.rb
# # /path/two/file1.rb
#
# MyClass.push_path(:files, ["/path/one", "/path/two"], "**/*.rb")
#
Expand Down

0 comments on commit 6bcdd1e

Please sign in to comment.