View context.md
From a question about DSLs.
See:
The code in the Adventure::Room
class could be made a little cleaner using a gem like fattr
View ruby_version.out
jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) 64-Bit Server VM 1.6.0_29-b11-402-11D50b [darwin-x86_64] |
View ruby_version.out
jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) 64-Bit Server VM 1.6.0_29-b11-402-11D50b [darwin-x86_64] |
View example.rb
require 'lattice' | |
class ApplicationCell | |
include Lattice::Cell | |
# Other custom stuff | |
end | |
class Person < Struct.new( :name , :birthday ) | |
end |
View quiz-1.md
So you think you wanna be a web developer... Fork this, update your copy with answers. They don't need to be precise - pseudo-code is fine in most cases. Some questions don't have correct answers.
View _readme.md
EJS Compiler
This is used to generate a templates.js
file where the keys are template identifiers and the values are the raw, escaped EJS templates.
Templates are semi-compiled server side. Results of compilation are memoized on the client side using Underscore.
This is useful for maintaining multiple template files server-side and compiling them into a client-side script.
This requires the use of the ejs
client side library. Requires ejs
to be available on window
. See: https://github.com/visionmedia/ejs#client-side-support
View out.txt
$ cat /usr/local/rvm/log/ruby-1.9.3-p194/yaml/make.log | |
[2012-06-23 05:51:12] make | |
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /usr/local/rvm/src/yaml-0.1.4/config/missing --run aclocal-1.11 | |
cd . && /bin/bash /usr/local/rvm/src/yaml-0.1.4/config/missing --run automake-1.11 --foreign | |
src/Makefile.am:2: Libtool library used but `LIBTOOL' is undefined | |
src/Makefile.am:2: The usual way to define `LIBTOOL' is to add `LT_INIT' | |
src/Makefile.am:2: to `configure.ac' and run `aclocal' and `autoconf' again. | |
src/Makefile.am:2: If `LT_INIT' is in `configure.ac', make sure | |
src/Makefile.am:2: its definition is in aclocal's search path. | |
make: *** [Makefile.in] Error 1 |
View minitest_integration.rb
require 'minitest/unit' | |
require 'minitest/spec' | |
module MiniTest | |
class DecoratorSpec < Spec | |
before do | |
ApplicationController.new.set_current_view_context | |
Draper::ViewContext.current.controller.request ||= ActionController::TestRequest.new | |
Draper::ViewContext.current.request ||= Draper::ViewContext.current.controller.request | |
Draper::ViewContext.current.params ||= {} |
View stable_marriage.rb
class Person | |
def initialize(name) | |
@name = name | |
@fiance = nil | |
@preferences = [] | |
@proposals = [] | |
end | |
attr_reader :name, :proposals | |
attr_accessor :fiance, :preferences | |