This file contains hidden or 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
| pairprog@pairprog06:~/jruby$ ant | |
| Buildfile: build.xml | |
| init: | |
| jar: | |
| init: | |
| extract-rdocs: |
This file contains hidden or 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
| function Greeter() { | |
| this.greet = function() { | |
| return "Hi"; | |
| } | |
| this.render_hi = function(container) { | |
| $(container).text('Hi there!'); | |
| } | |
| } |
This file contains hidden or 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
| Screw.Unit(function() { | |
| describe("Greeter", function() { | |
| it("should say Hi", function() { | |
| greeter = new Greeter(); | |
| expect(greeter.greet()).to(equal, "Hi"); | |
| }); | |
| it("should render the message 'Hi there' inside the container div", function() { | |
| dom_test = $('#dom_test'); | |
| dom_test.html(""); |
This file contains hidden or 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
| development: &default | |
| max_upload_in_bytes: <%= 1.megabyte %> |
This file contains hidden or 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 AppConstantsGenerator < Rails::Generator::Base | |
| def manifest | |
| record do |m| | |
| m.directory('config') | |
| m.file('constants.yml', 'config/constants.yml') | |
| m.directory('config/initializers') | |
| m.file('load_app_constants.rb', 'config/initializers/load_app_constants.rb') | |
| end | |
| end | |
| end |
This file contains hidden or 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 AppConstantsGenerator < Rails::Generators::Base | |
| def self.source_root | |
| @source_root ||= File.expand_path('../templates', __FILE__) | |
| end | |
| def copy_config_files | |
| copy_file('constants.yml', 'config/constants.yml') | |
| copy_file('load_app_constants.rb', 'config/initializers/load_app_constants.rb') | |
| end | |
| end |
This file contains hidden or 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 Person | |
| attr_accessor :name | |
| end |
This file contains hidden or 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
| // in the interface file | |
| @interface Person : NSObject | |
| { | |
| NSString *name; | |
| } | |
| @property(retain) NSString *name; | |
| @end | |
This file contains hidden or 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
| my_array.each do |item| | |
| puts(item) | |
| end |
This file contains hidden or 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
| //in the interface file | |
| @interface NSArray (each) | |
| -(void) each: (void (^)(id *))block; | |
| @end | |
| //in the implementation file | |
| @implementation NSArray (each) | |
| -(void) each: (void (^)(id *))block { | |
| for (id *object in self) { |
OlderNewer