| | |
| | |
© Copyright 2011 C42 Engineering. All Rights Reserved. Teach Ruby! | © Copyright 2011 C42 Engineering. All Rights Reserved. Учите Ruby! History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
For spelling and grammar changes, simply fork, edit, commit and send us a pull request! | Для внесения изменений просто клонируйте, отредактируйте текст, сохраните и отправьте нам на подтверждение! History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
If you want to add content and need your own private RubyMonk sandbox to test your changes, read on. | Если вы хотите добавить контент RubyMonk для тестирования себе на локальную машину, читайте дальше. History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
The Ruby Primer is an open collaboration initiative that uses the RubyMonk platform to help teach the Ruby | The Ruby Primer - открытый совместный проект, который использует платформу RubyMonk для изучения языка программирования Ruby. History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
Programming Language. How to Contribute Fork this repository. run bundle install && bin/rubymonk.rb to generate the URL to your very own RubyMonk sandbox. Use the generated URL to preview the contents in the sandbox. Make your changes in docs/. The sandbox URL will get updated with your changes as you make them. Once you are happy with your changes, send us a pull request with a clear description of changes you've done. Like any other open-source project, your pull request will be reviewed and then merged. How does this work? | Как работать Клонируйте этот репозиторий. запустите файл из директории & & bin / rubymonk.rb для генерации URL вашей локальной платформы RubyMonk. Используйте созданный URL для предварительного просмотра содержимого на локальной машине. Внесите необходимые изменения в директории docs/. Локальный URL будет обновляться по мере внесения изменений. Как только вы будете удовлетворены результатом, пришлите нам запрос с четким описанием сделанных вами изменений. Как и в любом другом проекте с открытым кодом, ваши изменения будут рассмотрены и затем добавлены в код. Как это работает? History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
The RubyMonk platform allows you to create and publish online e-books that contain embeddable, runnable Ruby code | Платформа RubyMonk позволяет создавать и публиковать онлайн электронные книги, которые содержат встраиваемый, работоспособный код Руби History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
| | |
RubyMonk uses standard Haml markup in combination with our very own DSL to achieve this. When you fork this | RubyMonk использует стандартный язык разметки HAML, для чего вы также можете использовать собственный DSL. Когда вы клонируете этот History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
repository and send us a pull request you are contributing content to The Ruby Primer, an introductory primer to the | репозиторий и затем отправите нам запрос, вы будете работать с содержимым The Ruby Primer, Введение в History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
| | |
The Ruby Primer is a free, open and interactive e-book published on the RubyMonk platform. The Magic DSL | The Ruby Primer - это бесплатная, открытая и интерактивная электронная книга на базе платформы RubyMonk. Волшебный DSL History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
All the content is inside docs/. The lessons are placed inside docs/<chapter>/<lesson_name>. | Весь контент находится в папке docs/. Уроки расположены в docs/<глава>/<название_урока>. History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
The lessons make use of standard Haml markup for content. It is interspersed with metadata that allows you to define | В контенте уроков используется стандартная разметка Haml, где вставляются метаданные, что позволяет определить History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
| | |
Every lesson starts with a section. A section needs a short_name and a title. | Каждый урок начинается с раздела. В разделе указываются короткое название (short_name) и заголовок (title). History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
Here is a template: title - <Title of the lesson> .section :a_short_name_of_the_section, "Title of the section" %p A paragraph. You can use any valid Haml here. Be mindful of the spacing though! | Вот шаблон: title - <Название урока> .section :a_short_name_of_the_section "Название раздела" % р Абзац. Здесь вы можете использовать любое допустимое значение HAML. Будьте внимательны при расстановке пробелов! History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
| | |
short_name :short_name_of_the_exercise | short_name :короткое_название_упражнения History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
| | |
starting_code <<-DATA # sample starting code. # uses Ruby's multiline construct. # code that will appear in the block by default. DATA | starting_code <<-DATA # Образец начала кода. # Используются многострочные конструкции Ruby. # Код, который появится в блоке по умолчанию. DATA History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
code_wrapper <<-DATA # you can use ERB templating here. # the user_code is passed as a variable to the templating engine. def method_that_gives_result_of_the_users_input <%= user_code %> end DATA | code_wrapper <<-DATA # здесь вы можете использовать ERB-шаблон. # user_code передается шаблонизатору как переменная. def метод_обработки_вводимых_данных <%= user_code %> end DATA History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
specs <<-DATA # it "the user should give the string xyz to pass this spec" do method_that_gives_result_of_the_users_input.should eq('xyz') end DATA | specs <<-DATA # it "пользователь должен передать строковое значение xyz" do метод_обработки_вводимых_данных.should eq('xyz') end DATA History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
| | |
The !enchant starts a block of exercise. Use !release once you are done. Every !enchant block mandatorily requires | !enchant начинает блок с упражнением. В конце ставьте !release. Каждый блок !enchant в обязательном порядке требует History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
the following attributes: exercise! or example! : An exercise has specs which have to pass for the user to continue. An example can be run, | следующие атрибуты: exercise! или example! : Упражнение имеет обязательные параметры работы с пользователем. Пример может быть запущен, History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
but does not affect the user's progress. short_name : short_name is used in the URLs for referring to the section. starting_code : Sample code that will appear by default in the code-block. code_wrapper : This is the block of code where you create a method to wrap the code written by the user. RubyMonk | но ничего не произойдет. short_name: short_name используется в URL-адресах для ссылки на раздел. starting_code: Пример кода, который будет отображаться по умолчанию в коде блока. code_wrapper: это блок кода, где вы создаете методы работы с данными пользователя. RubyMonk History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
uses ERB templating to render it, the user's code is passed in as the variable user_code. specs : RSpec block that tests the method in the code_wrapper. | использует шаблонизатор ERB для работы с ними, код пользователя записывается в переменную user_code. specs: блок с параметрами, который проверяет метод в code_wrapper. History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
To display any specific text in the RubyMonk output window when running a particular exercise, add puts or a similar | Для отображения текста в окне вывода RubyMonk при выполнении упражнений, добавьте команду ввода или аналогичную History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
command that writes to stdout in either the specs or the code_wrapper block. | команду, производящую стандартный вывод в блоки specs или code_wrapper. History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
An exercise needs to have: starting_code code_wrapper specs | Блок упражнения должен содержать: starting_code code_wrapper specs History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |
An example needs to have: starting_code | Блок примера должен содержать: starting_code History of edits
(Latest: firelight 3 months, 3 weeks ago)
§ | |