Chapter 6 in Cooper
- initialize is the Ruby Version of __init__
- global variables are indicated with a
$
(121) - local variables (121)
- instance variables are indicated with a
@
, and propagate well through an object declared as some class (121-122) - class variables are signified with a
@@
, and are useful for storing information relevant to all objects of a class (122) - class methods and instance methods (124)
- a class can inherent from only one other class, and methods it already has may be suplemented with methods in the parent class with the
super
method, otherwise the newer method overrides the older one. This means that methods you write can override the Ruby’s methods (127-128)
Ruby Bits I
- the
compact
method takes out anynils
in a string
Improving Sublime Text 2
- Installed package control
- Installed support for testing Ruby applications with RSpec though I’m not sure what this means
- <a href="https://github.com/maltize/sublime-text-2-ruby-tests"Installed, but have no idea how to use RubyTest
- Made Sublime accessible from the Terminal
- Later, I’ll look at some videos showing further use of Sublime Text 2, and for running RSpec Tests from Sublime Text 2
Advertisements