sortable 0.0.1 → 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -1
- data/README.rdoc +3 -1
- data/lib/sortable.rb +1 -3
- data/test/test_helper.rb +2 -0
- metadata +1 -1
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -15,6 +15,8 @@ first that provides a non-zero sort value is used.
|
|
15
15
|
require 'sortable'
|
16
16
|
|
17
17
|
class Book
|
18
|
+
include Sortable
|
19
|
+
|
18
20
|
attr_accessor :author, :title
|
19
21
|
|
20
22
|
sortable :author, lambda {|book| book.title.sub(/^(The|A|An) /, '')}
|
@@ -60,4 +62,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
60
62
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
61
63
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
62
64
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
63
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
65
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/sortable.rb
CHANGED
data/test/test_helper.rb
CHANGED