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
def calculate(str) | |
end | |
calculate("4+5") # 9 | |
calculate("10+8+2") # 20 | |
calculate("10-5") # 5 | |
calculate("10+2-4") # 8 |
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
[ 0] "/Users/james/.rvm/gems/ruby-2.1.2@quill/gems/byebug-3.4.0/lib/byebug/command.rb:41:in `eval'", | |
[ 1] "/Users/james/.rvm/gems/ruby-2.1.2@quill/gems/byebug-3.4.0/lib/byebug/command.rb:41:in `bb_warning_eval'", | |
[ 2] "/Users/james/.rvm/gems/ruby-2.1.2@quill/gems/byebug-3.4.0/lib/byebug/commands/eval.rb:36:in `block in execute'", | |
[ 3] "/Users/james/.rvm/gems/ruby-2.1.2@quill/gems/byebug-3.4.0/lib/byebug/commands/eval.rb:11:in `run_with_binding'", | |
[ 4] "/Users/james/.rvm/gems/ruby-2.1.2@quill/gems/byebug-3.4.0/lib/byebug/commands/eval.rb:32:in `execute'", | |
[ 5] "/Users/james/.rvm/gems/ruby-2.1.2@quill/gems/byebug-3.4.0/lib/byebug/processors/command_processor.rb:200:in `one_unknown_cmd'", | |
[ 6] "/Users/james/.rvm/gems/ruby-2.1.2@quill/gems/byebug-3.4.0/lib/byebug/processors/command_processor.rb:208:in `one_cmd'", | |
[ 7] "/Users/james/.rvm/gems/ruby-2.1.2@quill/gems/byebug-3.4.0/lib/byebug/processors/command_processor.rb:187:in `block in process_commands'", | |
[ 8] "/Users/james/.rvm |
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 StoriesController < ActivityController | |
def module | |
show_story | |
end | |
def homepage | |
load_record | |
show_story | |
end |
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
// Code will instantiate putting everyone in segment L. Mobile check will put users into I; zip code check will put people into seg A if in Chicago, | |
// Iteration 2 - Windy City pilot with MSA tracking | |
// Seg A - Outside of Windy City | |
// Seg B - blank seg | |
// Seg C - Windy City test area (carrover of previous seg C) | |
// Seg D = mobile users | |
// Seg E = technical issues |
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 Quill::BaseModel | |
include ActiveModel::Model | |
attr_accessor :id, :access_token | |
def self.special_attrs *attrs | |
return @special_attrs unless attrs.any? | |
@special_attrs = attrs | |
end | |
def self.inherited subclass |
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
module Quill | |
class Client | |
module Transport | |
class InvalidKeys < Exception ; end | |
attr_accessor :token, :client, :config | |
delegate :get, :post, :put, to: :token | |
include EndpointDefinitions | |
def initialize options = {} |
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 Quill::BaseModel | |
include ActiveModel::Model | |
attr_accessor :id, :access_token | |
def self.special_attrs *attrs | |
return @special_attrs unless attrs.any? | |
@special_attrs = attrs | |
end | |
def self.inherited subclass |
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
{ | |
"status": "success", | |
"message": "", | |
"errors": {}, | |
"activity": { | |
"uid": "R4LLUDAwWtIrqSWZc1BnTw", | |
"name": "Passage Proofreading: A Little Stranger on the Road (Fiction)", | |
"description": "Proofread a passage with eleven incorrect determiners and articles.", | |
"flags": [ | |
"production" |
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
" Section: Vim, Balloon Eval | |
" ------------------------ | |
" balloon eval in ruby is really annoying | |
if has("balloon_eval") && has("unix") | |
set noballooneval | |
"set ballooneval | |
endif |
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
main » DESIRED_CLASS | |
/price|product-price/i | |
main » node.attributes.values.map(&:to_s).first =~ DESIRED_CLASS | |
0 | |
main » node.attributes.values.map(&:to_s).first =~ /price/ | |
0 | |
main » node.attributes.values.map(&:to_s).first == /price/ | |
false | |
main » node.attributes.values.map(&:to_s).first == "price" | |
true |