This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// application library 1 | |
namespace App\Lib1; | |
const MYCONST = 'App\Lib1\MYCONST'; | |
function MyFunction() { | |
return __FUNCTION__; | |
} | |
class MyClass { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[request setRelationshipKeyPathsForPrefetching:[NSArray arrayWithObjects:@"articles", @"articles.features", nil]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Basket.all(:include => { :articles => :features}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo gem install do_mysql -- --with-mysql-dir=/usr/local/mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ShoppingBasket < ActiveRecord::Base | |
def initialize(items = []) | |
self.items = items | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ excellent shopping_basket.rb | |
Excellent result: | |
test.rb | |
* Line 1: ShoppingBasket does not validate any attributes. | |
* Line 1: ShoppingBasket defines initialize method. | |
* Line 1: ShoppingBasket does not specify attr_accessible. | |
Found 3 warnings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gem install excellent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Controllers | 74 | 57 | 4 | 6 | 1 | 7 | | |
| Helpers | 32 | 23 | 0 | 2 | 0 | 9 | | |
| Models | 497 | 319 | 13 | 22 | 1 | 12 | | |
| Libraries | 499 | 282 | 5 | 35 | 7 | 6 | | |
| Model specs | 942 | 658 | 0 | 5 | 0 | 129 | | |
| View specs | 0 | 0 | 0 | 0 | 0 | 0 | | |
| Controller specs | 471 | 315 | 0 | 6 | 0 | 50 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArbitraryModel < DataMapper::Type | |
primitive String | |
def self.dump(value, property) | |
"#{value.class}/#{value.id}" unless value.nil? | |
end | |
def self.load(value, property) | |
case value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeModel | |
include DataMapper::Resource | |
property :id, Serial | |
property :details, ArbitraryModel | |
end |
OlderNewer