Q: What is the function of modules in Ruby?
A: To provide namespaces. To provide a mechanism for multiple inheritance. To facilitate code reuse.
Q: What is the difference between a module and class?
A: A module cannot be instantiated.
| diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json | |
| index 55f9770..3c2fc2b 100644 | |
| --- a/npm-shrinkwrap.json | |
| +++ b/npm-shrinkwrap.json | |
| @@ -5,2009 +5,1792 @@ | |
| "requires": true, | |
| "dependencies": { | |
| "@types/node": { | |
| - "version": "8.0.52", | |
| - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.52.tgz", |
| # When comparing objects, identifiers must reference the same objects or array | |
| var a = {a: 1}; | |
| var b = {a: 1}; | |
| a == b // false | |
| a === b // false | |
| # The type of undefined is 'undefined', typeof(null) is object | |
| var a = null; | |
| a == undefined // true | |
| a === undefined // false |
| require 'net/http' | |
| require 'uri' | |
| # | |
| # Call with one of do_post, do_get or do_put. | |
| # Headers are automatically added to your options, so don't include them in your call. | |
| # The URL must be provided as a URI object so that it can be found in the list of arguments. | |
| # | |
| # e.g. puts SimpleHTTP.do_get(URI.parse('http://whatsmyuseragent.com/')) | |
| # puts "successful request? #{FakeUserAgent.success?}" |