lib/lotus/model/adapters/memory/query.rb in lotus-model-0.1.0 vs lib/lotus/model/adapters/memory/query.rb in lotus-model-0.1.1
- old
+ new
@@ -127,16 +127,16 @@
#
# query.exclude(id: [4, 9])
#
# @example Range
#
- # query.where(year: 1900..1982)
+ # query.exclude(year: 1900..1982)
#
# @example Multiple conditions
#
- # query.where(language: 'java')
- # .where(company: 'enterprise')
+ # query.exclude(language: 'java')
+ # .exclude(company: 'enterprise')
def exclude(condition)
column, value = _expand_condition(condition)
conditions.push(Proc.new{ reject! {|r| r.fetch(column) == value} })
self
end
@@ -259,11 +259,11 @@
self
end
# Returns the sum of the values for the given column.
#
- # @param column [Symbol] the colum name
+ # @param column [Symbol] the column name
#
# @return [Numeric]
#
# @since 0.1.0
#
@@ -284,11 +284,11 @@
end
end
# Returns the average of the values for the given column.
#
- # @param column [Symbol] the colum name
+ # @param column [Symbol] the column name
#
# @return [Numeric]
#
# @since 0.1.0
#
@@ -303,11 +303,11 @@
alias_method :avg, :average
# Returns the maximum value for the given column.
#
- # @param column [Symbol] the colum name
+ # @param column [Symbol] the column name
#
# @return result
#
# @since 0.1.0
#
@@ -318,11 +318,11 @@
_all_with_present_column(column).max
end
# Returns the minimum value for the given column.
#
- # @param column [Symbol] the colum name
+ # @param column [Symbol] the column name
#
# @return result
#
# @since 0.1.0
#
@@ -333,11 +333,11 @@
_all_with_present_column(column).min
end
# Returns the difference between the MAX and MIN for the given column.
#
- # @param column [Symbol] the colum name
+ # @param column [Symbol] the column name
#
# @return [Numeric]
#
# @since 0.1.0
#
@@ -353,10 +353,10 @@
end
# Returns a range of values between the MAX and the MIN for the given
# column.
#
- # @param column [Symbol] the colum name
+ # @param column [Symbol] the column name
#
# @return [Range]
#
# @since 0.1.0
#