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
| class MyClass | |
| def complex_property | |
| @my_complex_property | |
| end | |
| def complex_property= value | |
| #complex logic | |
| @my_complex_property = revamped_value | |
| 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
| class MyClass | |
| attr :name #this will create a getter for this property | |
| attr_accessor :hair_color #this will create a getter and setter for this property | |
| attr_reader :age, :surname, :birthdate #this will create only getters for all these properties | |
| attr_writer :listening, :talking #this will create only setters for all these properties | |
| 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
| class MyClass | |
| attr :name #this will create a getter for this property | |
| attr_accessor :hair_color #this will create a getter and setter for this property | |
| 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
| class MyClass | |
| attr :name #this will create a getter for this property | |
| attr :hair_color, true #the _true_ parameter will enable a setter for this property | |
| 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
| tradução | |
| -------- | |
| Tem conhecimentos que conhecemos. São as coisas que nós sabemos que sabemos. | |
| Tem conhecimentos que não conhecemos. Isso é, tem coisas que nós sabemos que não sabemos. | |
| Mas tem também conhecimentos desconhecidos. Essas são as coisas que não sabemos que não sabemos. | |
| original | |
| -------- | |
| There are known knowns. These are things we know that we know. |
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
| $ sudo apt-get install ruby1.9.1-dev |
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
| $ sudo apt-get install libsqlite3-dev |
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
| $ sudo gem install sqlite3-ruby |
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
| $ sudo apt-get install ruby1.9.1-dev libsqlite3-ruby libsqlite3-dev | |
| $ sudo gem install sqlite3-ruby |
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
| $ grep "string_to_search_in_files" "folder/to/search" -R |