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
log = (o) -> console.log o | |
# -------------- CLASS DEFINITIONS ------------- | |
# Private methods are starting with underscore, but this is just for better readability | |
class SimpleOOPPattern | |
@classProperty: 'le class property' | |
@classMethod: -> | |
'le class method' | |
publicProperty: 'le public property' |
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
### | |
Caffeinated.js 1.0.1 | |
(c) 2012 Petr Kaleta, @petrkaleta | |
Caffeinated.js is freely distributable under the MIT license. | |
Micro JavaScript library written in CoffeeScript to make my life easier when creating mobile web apps for iOS. | |
I don't like extending built-in JavaScript objects, so I've created this lib as an separate object. | |
I used underscore identifier to make its calls short as possible. So please do not mess this lib with gorgeous | |
Underscore.js lib by Jeremy Ashkenas, DocumentCloud Inc. | |
Some methods are inspired or borrowed from popular JavaScript frameworks like jQuery, Underscore.js and Prototype.js |
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
# Elixir has pipes `|>`. Let's try to implement those in Ruby. | |
# | |
# I want to write this: | |
# | |
# email.body | RemoveSignature | HighlightMentions | :html_safe | |
# | |
# instead of: | |
# | |
# HighlightMentions.call(RemoveSignature.call(email.body)).html_safe | |
# |