- What is a class?
- What is an object?
- What is a module? Can you tell me the difference between classes and modules?
- Can you tell me the three levels of method access control for classes and modules? What do they imply about the method?
- There are three ways to invoke a method in ruby. Can you give me at least two?
- Explain this ruby idiom: a ||= b
- What does self mean?
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
describe "Shopping Cart Requests" do | |
let!(:user) { Fabricate(:user) } | |
before(:each) do | |
login_user_post("admin", "admin") | |
end | |
context "when I visit the shopping cart" do | |
it " show the logged in users' cart items " do | |
#Test stuff |
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
NoMethodError: undefined method `logger=' for ActionCable::Server::Base:Class | |
Did you mean? logger | |
/Users/austenito/.gem/ruby/2.3.1/gems/timber-2.0.4/lib/timber/frameworks/rails.rb:50:in `set_logger' | |
/Users/austenito/.gem/ruby/2.3.1/gems/timber-2.0.4/lib/timber/frameworks/rails.rb:14:in `block in <class:Railtie>' | |
/Users/austenito/.gem/ruby/2.3.1/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec' | |
/Users/austenito/.gem/ruby/2.3.1/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run' | |
/Users/austenito/.gem/ruby/2.3.1/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers' | |
/Users/austenito/.rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each' | |
/Users/austenito/.rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' | |
/Users/austenito/.rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from' |
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 Router | |
class ApiConstraints | |
def initialize(options) | |
@version = options[:version] | |
@default = options[:default] | |
end | |
def default? | |
@default | |
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
### Keybase proof | |
I hereby claim: | |
* I am austenito on github. | |
* I am austenito (https://keybase.io/austenito) on keybase. | |
* I have a public key whose fingerprint is BE7D D06E 9399 B7A5 38C3 1C95 600A F3AC 13F0 1194 | |
To claim this, I am signing this object: |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
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
; <<>> DiG 9.8.3-P1 <<>> bonobos.com TXT | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59297 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;bonobos.com. IN TXT | |
;; ANSWER SECTION: |
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
analytics.track('Completed Order', { | |
orderId: '306167171', | |
total: 286.76, | |
revenue: 268, | |
discount: 0, | |
shipping: 0, | |
tax: 18.76, | |
currency: 'USD', | |
pants-fit: ['tailored', 'slim', 'athletic'], | |
color: ['blue','redrums'], |
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
if Moped.logger == Rails.logger | |
Moped.logger = Logger.new($stdout) | |
true | |
else | |
Moped.logger = Rails.logger | |
false | |
end |
NewerOlder