{"id":296292,"date":"2019-12-24T09:00:28","date_gmt":"2019-12-24T09:00:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=296292"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=296292","title":{"rendered":"Pry \u2192\u00a0REPL \u0434\u043b\u044f Ruby, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u043e\u0301\u0438\u0442 \u0442\u043e\u0433\u043e"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/481728\/\">\n<h3 id=\"repl\">REPL<\/h3>\n<p>  <\/p>\n<p><code>REPL<\/code> \u0432 \u043c\u0438\u0440\u0435 \u043d\u0430\u043a\u043e\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a <a href=\"https:\/\/www.allacronyms.com\/REPL\" rel=\"nofollow\">Read \u2192\u00a0Evaluate \u2192 Print Loop<\/a>. \u0417\u0430\u0447\u0438\u0442\u0430\u043b\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438, \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u043b\u0438, \u0438 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437.<\/p>\n<p>  <\/p>\n<p>Ruby, \u043a\u0430\u043a \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 <em>REPL<\/em> \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>irb<\/code>. \u041a\u043e\u0442\u043e\u0440\u044b\u0439, \u0445\u043e\u0442\u044f \u0438 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438, \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u0437\u044b\u0441\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442. \u041d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430: <a href=\"http:\/\/pryrepl.org\/\" rel=\"nofollow\"><code>pry<\/code><\/a>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ff1\/bf9\/5e6\/ff1bf95e6d1c4e3055b7bf9759b7673e.png\" alt=\"Pry Logo\"><\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0412\u043e\u0442 \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u044b\u0439 \u043e\u0442\u0440\u044b\u0432\u043e\u043a \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 <code>pry<\/code>:<\/p>\n<p>  <\/p>\n<blockquote><p><em>Pry<\/em>\u00a0\u2014\u00a0\u044d\u0442\u043e <strong>\u043c\u043e\u0449\u043d\u0430\u044f<\/strong> \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 IRB-\u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0435 \u0434\u043b\u044f Ruby. \u0421 <strong>\u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430<\/strong>, <strong>\u0433\u0438\u0431\u043a\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432<\/strong>, \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 <strong>\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/strong> \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u043c <strong>\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432<\/strong> \u0438 <strong>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/strong>.<\/p><\/blockquote>\n<p>\u0418 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u043e\u0435 \u0431\u043b\u0430-\u0431\u043b\u0430-\u0431\u043b\u0430. \u042d\u0442\u043e \u043f\u0440\u0430\u0432\u0434\u0430. \u042f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c <code>pry<\/code> \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0432\u0438\u0441\u0442\u0435\u043b\u043a\u0430\u043c\u0438 \u0438 \u043a\u0440\u0438\u0447\u0430\u043b\u043a\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u044c \u0441\u0430\u043c\u043e\u0433\u043e \u0438\u0441\u043a\u0443\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0420\u0443\u0431\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"podgotovka\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h3>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ gem install pry pry-theme awesome_print coderay<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435, \u043c\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0433\u043e\u0442\u043e\u0432\u044b. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c <code>pry<\/code>\u2026 \u0438 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 <code>irb<\/code> \u043d\u0435\u0442. \u0412\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c-\u0442\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u041d\u0443 \u0447\u0442\u043e \u0436, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0443\u0447\u0438\u043c <code>pry<\/code> \u0431\u044b\u0442\u044c \u0447\u0443\u0442\u043e\u0447\u043a\u0443 \u043f\u043e\u0443\u043c\u043d\u0435\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"konfiguracionnyy-fvyl\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0432\u0439\u043b<\/h3>\n<p>  <\/p>\n<p>\u042d\u0442\u043e <code>.pryrc<\/code>. \u0412 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 <code>pry<\/code>, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c, \u0438 \u043a\u0430\u043a \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0432 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e\u043c \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435. \u0415\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>cd &amp;&amp; touch .pryrc<\/code>.<\/p>\n<p>  <\/p>\n<h3 id=\"delikatnoe-napolnenie-pryrc-instrukciyami\">\u0414\u0435\u043b\u0438\u043a\u0430\u0442\u043d\u043e\u0435 \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 <code>.pryrc<\/code> \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438<\/h3>\n<p>  <\/p>\n<p>\u042f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <code>pry<\/code> \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c. \u0414\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445: <a href=\"https:\/\/gist.github.com\/am-kantox\/5ebb68916ccde06736e8d95026693742\" rel=\"nofollow\"><code>gist \u0441 \u043c\u043e\u0438\u043c .pryrc<\/code><\/a>.<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/pry\/pry\/wiki\" rel=\"nofollow\"><code>pry<\/code> \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430<\/a>: \u0437\u0434\u0435\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u043a\u0438\u043b\u043e\u0442\u043e\u043d\u043d\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u0438\u0441\u0442\u043e\u0432,<\/li>\n<li><a href=\"https:\/\/github.com\/kyrylo\/pry-theme\/wiki\" rel=\"nofollow\"><code>pry<\/code> \u0442\u0435\u043c\u044b \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f<\/a>: \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043e\u0442\u0432\u0435\u0442\u044b, \u0438 \u0442. \u043f.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"redaktor-po-umolchaniyu\">\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/h4>\n<p>  <\/p>\n<pre><code class=\"ruby\">Pry.editor = 'vi' # 'code', 'subl'<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 (\u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>edit<\/code>).<\/p>\n<p>  <\/p>\n<h4 id=\"priglashenie-komandnoy-stroki\">\u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438<\/h4>\n<p>  <\/p>\n<pre><code class=\"ruby\">Pry.config.prompt =   [     -&gt;(_obj, _nest_level, _) { \"\u270e \" },     -&gt;(*) { \"  \" }   ]<\/code><\/pre>\n<p>  <\/p>\n<p><code>.pryrc<\/code> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0443\u0431\u0438-\u0444\u0430\u0439\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043c\u0430\u0439\u043d\u0438\u0442\u044c \u0431\u0438\u0442\u043a\u043e\u0439\u043d\u044b, \u043f\u043e\u043a\u0430 \u0432\u044b \u0436\u0434\u0435\u0442\u0435 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0443\u0440\u043e\u0432\u043d\u0438 (\u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u043e\u0432) \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443. \u0420\u0430\u043d\u044c\u0448\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <em>\u0447\u0435\u0440\u043d\u044b\u0439 \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u043d\u044b\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0440\u0435\u0437\u0430\u0435\u0442 \u0442\u0443\u043f\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u0445\u0430\u0431\u0440\u0430<\/em> \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0438 \u25b7 \u0434\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445, \u043d\u043e \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u0430\u043a\u0438\u0445 \u0431\u044b \u0442\u043e \u043d\u0438 \u0431\u044b\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a.<\/p>\n<p>  <\/p>\n<h4 id=\"cveta\">\u0426\u0432\u0435\u0442\u0430<\/h4>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0442\u0435\u043c \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>pry-theme<\/code> gem. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0443 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 (\u0430 \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e\u0435\u0434\u0430\u0435\u0442, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e <code>PRY_BW=true pry<\/code>). \u0414\u043b\u044f \u043f\u0430\u043f\u043e\u043a \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c <em>Rails<\/em> (\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u044b <em>Rails<\/em>) \u0446\u0432\u0435\u0442\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0435\u0449\u0435 \u043f\u0440\u0438\u0447\u0443\u0434\u043b\u0438\u0432\u0435\u0435, \u043d\u043e \u044f \u043d\u0435\u043d\u0430\u0432\u0438\u0436\u0443 <em>Rails<\/em>, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u0442\u043e\u0447\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0433\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\">unless ENV['PRY_BW']   Pry.color = true   Pry.config.theme = \"railscasts\"   Pry.config.prompt = PryRails::RAILS_PROMPT if defined?(PryRails::RAILS_PROMPT)   Pry.config.prompt ||= Pry.prompt end<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"istoriya\">\u0418\u0441\u0442\u043e\u0440\u0438\u044f<\/h4>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u043a\u0430. \u041d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430, \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u23ce, \u0438 \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0430. \u0427\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0432 \u043a\u043e\u0434 \u0432 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0435 (\u0435\u0441\u043b\u0438 \u0432\u044b, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u043e\u043c, \u0430 \u043d\u0435 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0435 \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c, \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044f \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440 \u043d\u0438\u043a\u043e\u0433\u0434\u0430, \u043a\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044f).<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\">Pry.config.history.should_save = true Pry::Commands.command \/^$\/, \"repeat last command\" do   _pry_.run_command Pry.history.to_a.last end<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"komandy\">\u041a\u043e\u043c\u0430\u043d\u0434\u044b<\/h4>\n<p>  <\/p>\n<p>\u041e\u0442\u043b\u0430\u0434\u0447\u0438\u043a. \u0412\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u043d\u0435 \u043c\u043e\u0439, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u044d\u0442\u0438 \u043f\u044f\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0430 \u043f\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442 \u0432\u0441\u044e \u0441\u0432\u043e\u044e \u0436\u0438\u0437\u043d\u044c \u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0435, \u043d\u043e, \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\">Pry.commands.alias_command 'c', 'continue' rescue nil Pry.commands.alias_command 's', 'step' rescue nil Pry.commands.alias_command 'n', 'next' rescue nil Pry.commands.alias_command 'f', 'finish' rescue nil Pry.commands.alias_command 'l', 'whereami' rescue nil<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"konfiguraciya-opisaniya-modulya--klassa\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \/ \u043a\u043b\u0430\u0441\u0441\u0430<\/h4>\n<p>  <\/p>\n<pre><code class=\"ruby\">Pry.config.ls.separator = \"\\n\" # new lines between methods Pry.config.ls.heading_color = :magenta Pry.config.ls.public_method_color = :green Pry.config.ls.protected_method_color = :yellow Pry.config.ls.private_method_color = :bright_black<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0443\u0442, \u0432\u0440\u043e\u0434\u0435, \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<h3 id=\"vyzov-sistemnyh-utilit\">\u0412\u044b\u0437\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442<\/h3>\n<p>  <\/p>\n<p><code>Pry<\/code> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 (\u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u043e\u0447\u043a\u0443 \u043f\u0435\u0440\u0435\u0434 \u0438\u043c\u0435\u043d\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b\u0430, <code>.ls<\/code>, \u0438\u043b\u0438 <code>.ps axu<\/code>). <\/p>\n<p>  <\/p>\n<h3 id=\"plaginy\">\u041f\u043b\u0430\u0433\u0438\u043d\u044b<\/h3>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430. \u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u043b\u044e\u0431\u0438\u0442 \u0440\u0430\u0437\u0434\u0443\u0442\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043c\u044b \u0438\u0445 \u043e\u0442\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0438 \u0442\u0430\u0441\u043a\u0430\u0435\u043c \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u044f\u043c\u0438. \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u2014 \u043b\u0438\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440 (\u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 <code>awesome<\/code>). \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 \u043a\u043e\u0434\u0435 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u0441\u0430\u043c\u0438 \u0437\u0430 \u0441\u0435\u0431\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\"># `awesome_print` gem is a great syntax colorized printing # look at `~\/.aprc` for more settings for awesome_print begin   require 'awesome_print'   # The following line enables awesome_print for all pry output,   # and it also enables paging   Pry.config.print = proc {|output, value| Pry::Helpers::BaseHelpers.stagger_output(\"=&gt; #{value.ai}\", output)}    # If you want awesome_print without automatic pagination, use the line below   module AwesomePrint     Formatter.prepend(Module.new do       def awesome_self(object, type)         return super(object, type) unless type == :string         return super(object, type) unless @options[:string_limit]         return super(object, type) unless object.inspect.to_s.length &gt; @options[:string_limit]          colorize(object.inspect.to_s[0..@options[:string_limit]] + \"...\", type)       end     end)   end    AwesomePrint.defaults = {     :string_limit =&gt; 80,     :indent =&gt; 2,     :multiline =&gt; true   }   AwesomePrint.pry! rescue LoadError =&gt; err   puts \"gem install awesome_print  # &lt;-- highly recommended\" end<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"polzovatelskie-komandy\">\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/h3>\n<p>  <\/p>\n<p>\u042f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0447\u0442\u043e <code>pry<\/code> \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u0442\u043e\u0439 REPL? \u041c\u044b \u0434\u0430\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 <code>pry<\/code>. \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c <code>sql<\/code>-\u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0442\u043e\u0433\u043e SQL \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 (\u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 AR) \u2014\u00a0\u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u0439 \u043a\u043b\u0430\u0432\u0438\u0448.<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\">default_command_set = Pry::CommandSet.new do   command \"sql\", \"Send sql over AR.\" do |query|     if ENV['RAILS_ENV'] || defined?(Rails)       pp ActiveRecord::Base.connection.select_all(query)     else       pp \"No rails env defined\"     end   end end  Pry.config.commands.import default_command_set<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"monkeypatches-i-globals\">Monkeypatches \u0438 Globals<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u0434 Ruby \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 monkeypatches, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0435\u0430\u043d\u0441\u0430\u0445 <code>pry<\/code>. \u042f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0445\u043e\u0436\u0443 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0432\u0435\u0441\u044c\u043c\u0430 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0438 \u0445\u044d\u0448\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">class Array   def self.sample(count = 10, &amp;block)     Array.new(count, &amp;(block || :succ))   end end  Hash.singleton_class.prepend(Module.new   def sample(count = 10)     (?a...count.times.reduce(?a) { |o| o.succ }).       map(&amp;:to_sym).zip(0...count).to_h   end end)<\/code><\/pre>\n<p>  <\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/em> \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d \u0432\u043e\u0442 \u044d\u0442\u0438\u043c \u0432\u043e\u0442 <code>Integer#succ<\/code>, \u0432\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0438\u043c\u0435\u043b\u0438 \u0434\u0435\u043b\u043e \u0441 \u0434\u043b\u0438\u043d\u043d\u044b\u043c\u0438 \u0445\u044d\u0448\u0430\u043c\u0438, \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0438 \u0431\u043e\u043b\u0435\u0435 26 \u043a\u043b\u044e\u0447\u0435\u0439 \ud83d\ude42<\/p>\n<p>  <\/p>\n<h3 id=\"nastroyka-cveta\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0446\u0432\u0435\u0442\u0430<\/h3>\n<p>  <\/p>\n<p>\u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0438\u0436\u0435, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0446\u0432\u0435\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>coderay<\/code> gem. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u043e\u0433\u043e \u0441\u0442\u043e\u0438\u0442. \u0421\u0438\u043c\u0432\u043e\u043b\u044b \u043a\u0440\u0430\u0441\u043d\u044b\u0435, \u0430 \u0446\u0438\u0444\u0440\u044b \u0441\u0438\u043d\u0438\u0435, \u0438 \u0432\u0441\u0435 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u043e\u0447\u0435\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"ruby\">CodeRay.scan(\"example\", :ruby).term # just to load necessary files $LOAD_PATH &lt;&lt; File.dirname(File.realpath(__FILE__)) require \"escaped_colors\"  module CodeRay   module Encoders     class Terminal &lt; Encoder       TERM_TOKEN_COLORS.each_pair do |key, value|         TOKEN_COLORS[key] = value       end     end   end end<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"v-zaklyuchenie\">\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0437\u0430\u043c\u0435\u0442\u043a\u0430 \u0434\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <code>pry<\/code>, \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d\u043e \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c <code>irb<\/code>. \u042f \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0437\u0430\u043e\u0441\u0442\u0440\u044f\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044f \u043d\u0435 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u044e\u0441\u044c, \u0430 \u043f\u0438\u0448\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 \u043d\u0443\u043b\u044f. \u041d\u043e \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0441\u043c\u043e\u0433 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0445, \u043a\u0442\u043e \u0432\u0438\u0434\u0438\u0442 \u044d\u0442\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u0431\u0443\u043a\u0432 \u2014\u00a0<code>pry<\/code> \u2014\u00a0\u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u2014\u00a0\u0445\u043e\u0442\u044f \u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c. \u041f\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u043e\u043d\u043e \u0442\u043e\u0433\u043e \u0441\u0442\u043e\u0301\u0438\u0442.<\/p>\n<p>  <\/p>\n<p>\u0423\u0434\u0430\u0447\u043d\u044b\u0445 \u0440\u0435\u043f\u043b\u0438\u043a!<\/p>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/481728\/\"> https:\/\/habr.com\/ru\/post\/481728\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/481728\/\">\n<h3 id=\"repl\">REPL<\/h3>\n<p>  <\/p>\n<p><code>REPL<\/code> \u0432 \u043c\u0438\u0440\u0435 \u043d\u0430\u043a\u043e\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a <a href=\"https:\/\/www.allacronyms.com\/REPL\" rel=\"nofollow\">Read \u2192\u00a0Evaluate \u2192 Print Loop<\/a>. \u0417\u0430\u0447\u0438\u0442\u0430\u043b\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438, \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u043b\u0438, \u0438 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437.<\/p>\n<p>  <\/p>\n<p>Ruby, \u043a\u0430\u043a \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 <em>REPL<\/em> \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>irb<\/code>. \u041a\u043e\u0442\u043e\u0440\u044b\u0439, \u0445\u043e\u0442\u044f \u0438 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438, \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u0437\u044b\u0441\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442. \u041d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430: <a href=\"http:\/\/pryrepl.org\/\" rel=\"nofollow\"><code>pry<\/code><\/a>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ff1\/bf9\/5e6\/ff1bf95e6d1c4e3055b7bf9759b7673e.png\" alt=\"Pry Logo\"><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-296292","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/296292","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=296292"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/296292\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=296292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=296292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=296292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}