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
| module Starbucks | |
| def self.order(&block) | |
| order = Order.new | |
| order.instance_eval(&block) | |
| return order.drinks | |
| end | |
| class Order |
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
| var c = console.log.bind(console); // allows you to replace console.log(message) in your code with c(message) |
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
| # put the file into spec/support | |
| shared_examples_for "ActiveModel" do | |
| include ActiveModel::Lint::Tests | |
| # to_s is to support ruby-1.9 | |
| ActiveModel::Lint::Tests.public_instance_methods.map{|m| m.to_s}.grep(/^test/).each do |m| | |
| example m.gsub('_',' ') do | |
| send m | |
| 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
| @mixin no-select { | |
| -webkit-touch-callout: none; | |
| -webkit-user-select: none; | |
| -khtml-user-select: none; | |
| -moz-user-select: none; | |
| -ms-user-select: none; | |
| user-select: none; | |
| -webkit-touch-callout: none; | |
| -ms-text-size-adjust: none; |
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
| const dblTouchTapMaxDelay = 300 | |
| let latestTouchTap = { | |
| time: 0, | |
| target: null, | |
| } | |
| export default function isDblTouchTap(event) { | |
| const touchTap = { | |
| time: new Date().getTime(), | |
| target: event.currentTarget, |
OlderNewer