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 Station | |
# Принято делать отступы в 2 пробела | |
attr_accessor :name | |
# Это должна быть переменная экземпляра. Мы ведь список поездов храним для каждого объекта станции отдельно | |
trains = [] | |
def initialize(name) | |
@name = name | |
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
Links: | |
1. http://www.ikea.com/ru/ru/catalog/products/00142740/ | |
2. http://www.ikea.com/ru/ru/catalog/products/10234777/ | |
3. http://www.ikea.com/ru/ru/catalog/products/10251856/ | |
4. http://www.ikea.com/ru/ru/catalog/products/30146280/ | |
5. http://www.ikea.com/ru/ru/catalog/products/10234782/ | |
Item numbers: |
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 MyModule | |
@EXTENSION = [ | |
'one', | |
'two' | |
] | |
@one: -> | |
do @hello | |