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
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb | |
$SelectAll <M-A> | |
$Undo <M-Z> |
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
(require '[ring.swagger.swagger2 :as rs]) | |
(require '[schema.core :as schema]) | |
(schema/defschema Person {:age schema/Int}) | |
(defn adult? | |
[person] | |
(> (:age person) 17)) | |
(def Adult (schema/constrained Person adult?)) |
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
# simple DSL to describe and build URLs in an HTTP gateway | |
module ConfigurableGateway | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
def url_for(name, params = nil) | |
# probably should be replaced by an automatic forwarding mechanism |
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 Team | |
attr_accessor :name, :country | |
class << self | |
undef_method :new | |
end | |
def self.constructor(*args) | |
obj = allocate | |
obj.send(:initialize, *args) |