Merge pull request #842 from tricknotes/fix-method-comments

Fix method comments
This commit is contained in:
Ben Hollis 2013-03-29 08:51:10 -07:00
commit 7c1c93562a
5 changed files with 6 additions and 9 deletions

View file

@ -19,7 +19,7 @@ module Middleman
# @deprecated Prefer accessing settings through "config".
#
# @param [Symbol] key Name of the attribue
# @param value Attribute value
# @param default Attribute value
# @return [void]
def set(key, default=nil, &block)
config.define_setting(key, default)

View file

@ -143,7 +143,7 @@ module Middleman
# Whether the source file is binary.
#
# @retrun [Boolean]
# @return [Boolean]
def binary?
::Middleman::Util.binary?(source_file)
end

View file

@ -126,8 +126,6 @@ module Middleman
# Register a handler to provide metadata on a url path
# @param [Regexp] matcher
# @param [Symbol] origin an indicator of where this metadata came from - only one
# block per [matcher, origin] pair may exist.
# @return [Array<Array<Proc, Regexp>>]
def provides_metadata_for_path(matcher=nil, &block)
@_provides_metadata_for_path ||= []

View file

@ -27,12 +27,12 @@ module Middleman
return false if Tilt.registered?(ext.sub('.',''))
ext = ".#{ext}" unless ext.to_s[0] == ?.
mime = ::Rack::Mime.mime_type(ext, nil)
mime = ::Rack::Mime.mime_type(ext, nil)
unless mime
binary_bytes = [0, 1, 2, 3, 4, 5, 6, 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31]
s = File.read(filename, 4096) || ''
s = File.read(filename, 4096) || ''
s.each_byte do |c|
return true if binary_bytes.include?(c)
return true if binary_bytes.include?(c)
end
return false
end
@ -133,7 +133,7 @@ module Middleman
# Get a recusive list of files inside a set of paths.
# Works with symlinks.
#
# @param path A path string or Pathname
# @param paths Some paths string or Pathname
# @return [Array] An array of filenames
def self.all_files_under(*paths)
paths.flatten!

View file

@ -50,7 +50,6 @@ module Middleman
# Output a stylesheet link tag based on the current path
#
# @param [Symbol] asset_ext The type of asset
# @param [String] separator How to break up path in parts
# @param [String] asset_dir Where to look for assets
# @return [void]
def auto_tag(asset_ext, asset_dir=nil)