Skip to content

Commit

Permalink
- nodoc
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed May 15, 2012
1 parent c3c31b6 commit 1fa9047
Show file tree
Hide file tree
Showing 29 changed files with 57 additions and 55 deletions.
2 changes: 1 addition & 1 deletion server/aux/picky/cli.rb
Expand Up @@ -2,7 +2,7 @@ module Picky

# A very simple CLI selector.
#
class CLI # :nodoc:all
class CLI

# Execute a command.
#
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/analyzer.rb
Expand Up @@ -3,7 +3,7 @@

# Analyzes indexes (index bundles, actually).
#
class Analyzer # :nodoc:all
class Analyzer

attr_reader :analysis, :comments

Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/calculations/location.rb
@@ -1,6 +1,6 @@
module Picky

module Calculations # :nodoc:all
module Calculations

# A location calculation recalculates a 1-d location
# to the Picky internal 1-d "grid".
Expand Down
4 changes: 2 additions & 2 deletions server/lib/picky/character_substituters/west_european.rb
Expand Up @@ -12,7 +12,7 @@ module CharacterSubstituters
#
class WestEuropean

def initialize # :nodoc:
def initialize
@chars = ActiveSupport::Multibyte.proxy_class
end

Expand Down Expand Up @@ -45,7 +45,7 @@ def substitute text
}.pack 'U*'
end

def to_s # :nodoc:
def to_s
self.class.name
end

Expand Down
4 changes: 2 additions & 2 deletions server/lib/picky/deployment.rb
@@ -1,7 +1,7 @@
require File.expand_path '../constants', __FILE__

module Picky # :nodoc:
module Capistrano # :nodoc:all
module Picky
module Capistrano

# Include all
#
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/extensions/array.rb
@@ -1,6 +1,6 @@
# The Array class we all know and love.
#
class Array # :nodoc:all
class Array

# Cluster-uniqs equal neighborly elements.
#
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/extensions/class.rb
@@ -1,6 +1,6 @@
# The original Class class.
#
class Class # :nodoc:all
class Class

def instance_delegate *methods
methods.each do |method|
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/extensions/hash.rb
@@ -1,6 +1,6 @@
# Extensions for the Hash.
#
class Hash # :nodoc:all
class Hash

# Use yajl's encoding.
#
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/extensions/module.rb
@@ -1,6 +1,6 @@
# The original Module class.
#
class Module # :nodoc:all
class Module

def each_delegate *methods
options = methods.pop
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/extensions/object.rb
@@ -1,4 +1,4 @@
class Object # :nodoc:all
class Object

# TODO Remove.

Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/extensions/string.rb
@@ -1,6 +1,6 @@
# Extending the String class.
#
class String # :nodoc:all
class String

# Returns a _single_ double metaphone code
# for this string.
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/extensions/symbol.rb
@@ -1,6 +1,6 @@
# Extending the Symbol class.
#
class Symbol # :nodoc:all
class Symbol

# Returns a _single_ double metaphone code
# for this symbol.
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/generators/similarity/phonetic.rb
Expand Up @@ -27,7 +27,7 @@ def initialize amount = 3

# Tries to require the text gem.
#
def check_gem # :nodoc:
def check_gem
require 'text'
rescue LoadError
warn_gem_missing 'text', 'a phonetic Similarity'
Expand Down
4 changes: 2 additions & 2 deletions server/lib/picky/index.rb
Expand Up @@ -288,7 +288,7 @@ def ranged_category category_name, range, options = {}
# THINK Will have to write a wrapper that combines two categories that are
# indexed simultaneously, since lat/lng are correlated.
#
def geo_categories lat_name, lng_name, radius, options = {} # :nodoc:
def geo_categories lat_name, lng_name, radius, options = {}

# Extract lat/lng specific options.
#
Expand Down Expand Up @@ -316,7 +316,7 @@ def geo_categories lat_name, lng_name, radius, options = {} # :nodoc:

end

def to_stats # :nodoc:
def to_stats
stats = <<-INDEX
#{name} (#{self.class}):
#{"source: #{source}".indented_to_s}
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/indexers/base.rb
Expand Up @@ -35,7 +35,7 @@ def reset source
source.reconnect! if source.respond_to?(:reconnect!)
end

def check source # :nodoc:
def check source
raise "Trying to index without a source for #{@index_or_category.name}." unless source
end

Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/loader.rb
Expand Up @@ -2,7 +2,7 @@ module Picky

# Loads the search engine and it
#
module Loader # :nodoc:all
module Loader

class << self

Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/performant.rb
@@ -1,6 +1,6 @@
module Picky

module Performant # :nodoc:all
module Performant
# C Code here.
end

Expand Down
8 changes: 5 additions & 3 deletions server/lib/picky/query/allocation.rb
Expand Up @@ -2,13 +2,15 @@ module Picky

module Query

# An #Allocation contains an ordered list of
# tuples (#Combination s).
# The #Combination s are ordered according to the order
# An Allocation contains an ordered list of
# tuples (Combinations).
# The Combinations are ordered according to the order
# of the words in the query.
#
# It offers convenience methods to calculate the #ids etc.
#
# An Allocation is normally contained in an Allocations container.
#
class Allocation

attr_reader :count,
Expand Down
12 changes: 6 additions & 6 deletions server/lib/picky/query/allocations.rb
Expand Up @@ -2,17 +2,17 @@ module Picky

module Query

# Container class for #Allocation s.
# Container class for Allocation s.
#
# This class is asked by the #Results class to
# This class is asked by the Results class to
# compile and process a query.
# It then asks the #Allocation s to process their
# ids and scores, each in turn.
# It then asks each Allocation to process their
# ids and scores.
#
# It also offers convenience methods to access #ids
# of its #Allocation s.
# of its Allocation s.
#
class Allocations # :nodoc:all
class Allocations

delegate :each,
:empty?,
Expand Down
12 changes: 4 additions & 8 deletions server/lib/picky/query/combination.rb
Expand Up @@ -2,14 +2,10 @@ module Picky

module Query

# Describes the #Combination of a #Token (the text) and
# the index (the bundle): [text, index_bundle]
# Describes the Combination of a Token (the text) and
# the index (the bundle): [text, index_bundle].
#
# A #Combination is a single part of an allocation:
# [..., [text2, index_bundle2], ...]
#
# An #Allocation consists of an ordered number of #Combinations:
# [[text1, index_bundle1], [text2, index_bundle2], [text3, index_bundle1]]
# An Allocation consists of an ordered number of Combinations.
#
class Combination

Expand Down Expand Up @@ -74,7 +70,7 @@ def to_result
end

# Example:
# "exact title:Peter*:peter"
# "exact title:Peter*:peter"
#
def to_s
"#{category.bundle_for(token).identifier}(#{to_result.join(':')})"
Expand Down
17 changes: 9 additions & 8 deletions server/lib/picky/query/combinations.rb
Expand Up @@ -2,14 +2,15 @@ module Picky

module Query

# #Combinations represent an ordered list of #Combination s.
# Combinations represent an ordered list of Combination s.
#
# They are the core of an #Allocation.
# An #Allocation consists of a number of #Combinations.
# Combinations contain methods for calculating score (including
# the boost) and ids for each of its Combination s.
#
# They are the core of an Allocation.
# An Allocation consists of a number of Combinations.
#
# #Combinations contain methods for calculating score (including the boost) and ids.
#
class Combinations # :nodoc:all
class Combinations

attr_reader :combinations

Expand All @@ -36,8 +37,8 @@ def boost_for weights
# that are passed in, are removed.
#
# Note: This method is not totally independent of the calculate_ids one.
# Since identifiers are only nullified, we need to not include the
# ids that have an associated identifier that is nil.
# Since identifiers are only nullified, we need to not include the
# ids that have an associated identifier that is nil.
#
def remove categories = []
@combinations.reject! { |combination| categories.include?(combination.category) }
Expand Down
6 changes: 3 additions & 3 deletions server/lib/picky/query/indexes_check.rb
Expand Up @@ -14,13 +14,13 @@ class << self
#
# Picky will raise a Query::Indexes::DifferentBackendsError.
#
def check_backends indexes # :nodoc:
def check_backends indexes
backends = indexes.map &:backend
backends.uniq! &:class
raise_different backends if backends.size > 1
backends
end
def raise_different backends # :nodoc:
def raise_different backends
raise DifferentBackendsError.new(backends)
end

Expand All @@ -31,7 +31,7 @@ def raise_different backends # :nodoc:
# Currently it isn't possible using Memory and Redis etc.
# indexes in the same query index group.
#
class DifferentBackendsError < StandardError # :nodoc:all
class DifferentBackendsError < StandardError
def initialize backends
@backends = backends
end
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/query/qualifier_category_mapper.rb
Expand Up @@ -6,7 +6,7 @@ module Query

# Collection class for qualifiers.
#
class QualifierCategoryMapper # :nodoc:all
class QualifierCategoryMapper

attr_reader :mapping

Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/query/token.rb
Expand Up @@ -9,7 +9,7 @@ module Query
# It also knows whether it needs to look for similarity (bla~),
# or whether it is a partial (bla*).
#
class Token # :nodoc:all
class Token

attr_reader :text, :original
attr_writer :similar
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/query/tokens.rb
Expand Up @@ -6,7 +6,7 @@ module Query

# This class primarily handles switching through similar token constellations.
#
class Tokens # :nodoc:all
class Tokens

attr_reader :ignore_unassigned

Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/rack/harakiri.rb
@@ -1,4 +1,4 @@
module Rack # :nodoc:
module Rack

# Simple Rack Middleware to kill Unicorns after X requests.
#
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/search.rb
Expand Up @@ -227,7 +227,7 @@ def tokenized text

# Gets sorted allocations for the tokens.
#
def sorted_allocations tokens, amount = nil # :nodoc:
def sorted_allocations tokens, amount = nil
indexes.prepared_allocations_for tokens, boosts, amount
end

Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/statistics.rb
Expand Up @@ -6,7 +6,7 @@ module Picky

# Gathers various statistics.
#
class Statistics # :nodoc:all
class Statistics

def initialize
@indexes = ["\033[1mIndexes analysis\033[m:"]
Expand Down
5 changes: 4 additions & 1 deletion server/lib/tasks/try.rb
@@ -1,5 +1,8 @@
module Picky


# Try is used by
# rake try[index,category]
#
class Try

attr_reader :text, :specific
Expand Down

0 comments on commit 1fa9047

Please sign in to comment.