{"id":188046,"date":"2013-07-27T23:39:02","date_gmt":"2013-07-27T19:39:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=188046"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=188046","title":{"rendered":"<span class=\"post_title\">\u041f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 Ruby: \u0428\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0444\u0442\u0430 \u0440\u0430\u0441\u0442\u0435\u0442, \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0443\u0445\u0432\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0437\u0430 \u043d\u043e\u0432\u0435\u0439\u0448\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0440\u0435\u043c\u0435\u0441\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u044f\u0437\u044b\u043a\u043e-\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043f\u043e\u0441\u0442\u043e\u0432 \u043c\u044b \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0432\u0435\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u042f \u043d\u0430\u0441\u0442\u0440\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043a\u043d\u0438\u0433\u0443 Russ Olsen \u2014 Design Patterns in Ruby. \u041d\u0430\u0448 \u0446\u0438\u043a\u043b \u043f\u043e\u0441\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u0440\u043f\u0430\u0442\u044c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043e\u0442\u0442\u0443\u0434\u0430 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u043c-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u043a\u0440\u0430\u0442\u043a\u043e\u0439 \u0432\u044b\u0436\u0438\u043c\u043a\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0442\u043e \u0447\u0442\u043e \u0432\u044b \u0447\u0438\u0442\u0430\u0435\u0442\u0435 (\u0430 \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043d\u0430 \u044d\u0442\u043e!), \u043a\u043d\u0438\u0433\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>  \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c. \u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u044f\u044f \u0442\u0435\u043c\u0430 \u2014 \u0428\u0430\u0431\u043b\u043e\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0439 \u0434\u0435\u043d\u044c \u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/h2>\n<p>  <\/p>\n<h3>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/h3>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0433\u043e\u0432\u043e\u0440\u044f, \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043d\u0430\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0444\u0442. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u043b\u044e\u0431\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u043c\u0435\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041c\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0431\u0438\u0432\u0430\u0442\u044c \u0448\u0443\u0440\u0443\u043f \u043c\u043e\u043b\u043e\u0442\u043a\u043e\u043c, \u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0432\u0440\u0435\u0434\u0438\u043c \u0434\u043e\u0441\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0443\u0440\u0443\u043f\u043e\u0432\u0435\u0440\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0443\u043c\u0435\u0441\u0442\u043d\u043e. \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u0432\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0432 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0440\u0435\u0448\u0438\u0442\u044c.<\/p>\n<p>  \u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u0443\u0440\u043d\u044b\u043c \u0442\u043e\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0433\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h3>\u0414\u0430\u0432\u0430\u0439\u0442\u0435-\u043a\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0435\u043d<\/h3>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043d\u0430\u0448 \u043f\u0440\u043e\u0440\u0430\u0431 \u0441\u043a\u0430\u0437\u0430\u043b \u043d\u0430\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0435\u043d. \u0412\u0441\u0435 \u0441\u0442\u0435\u043d\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 (\u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u0440\u043e\u0440\u0430\u0431 \u0434\u0430\u043b \u043d\u0430\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439).<\/p>\n<pre><code class=\"ruby\"># \u0427\u0435\u0440\u0442\u0435\u0436\u0438 \u0441\u0442\u0435\u043d\u044b (Wall) require 'minitest\/autorun'  describe Wall do   let(:wall) { Wall.new }    it 'should state its dimensions' do     wall.dimensions.must_equal 'I am 30ft. long and 20ft. wide!'   end    it 'should be made from brick' do     wall.made_from.must_equal 'I am made from brick!'   end end <\/code><\/pre>\n<p>  \u041a\u0430\u043a\u043e\u0439 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0438\u043a, \u043e\u043d \u0434\u0430\u043b \u043d\u0430\u043c \u0447\u0435\u0440\u0442\u0435\u0436\u0438! \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0441\u0442\u0435\u043d\u0443:<\/p>\n<pre><code class=\"ruby\">class Wall   def dimensions     'I am 30ft. long and 20ft. wide!'   end    def made_from     'I am made from brick!'   end end <\/code><\/pre>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041d\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442, \u0432\u0441\u0435 \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u044b \u0438 \u043c\u044b \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0438\u0434\u0451\u043c \u043e\u0431\u0435\u0434\u0430\u0442\u044c!<\/p>\n<h3>\u041c\u043e\u043b\u043e\u0442\u043e\u043a \u0438\u043b\u0438 \u0413\u0432\u043e\u0437\u0434\u043e\u043c\u0435\u0442?<\/h3>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u0435\u0440\u043d\u0443\u043b\u0438\u0441\u044c, \u043f\u0440\u043e\u0440\u0430\u0431 \u0441\u043a\u0430\u0437\u0430\u043b \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0442\u0435\u043d. &quot;\u0412\u043e\u0442 \u0436\u0435\u0436 \u0442\u043e\u0440\u0442\u0430 \u043a\u0443\u0441\u043e\u043a&quot;, \u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u043c\u044b, \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u044f \u043a\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u0431\u044b\u043b\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0442\u0435\u043d\u0443 (<code>Wall<\/code>).<\/p>\n<p>  &quot;\u041d\u0435 \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e, \u0440\u0435\u0431\u044f\u0442\u043a\u0438&quot;, \u043f\u043e\u0441\u043f\u0435\u0448\u0438\u043b \u0432\u043e\u0437\u0440\u0430\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0440\u0430\u0431. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0447\u0435\u0440\u0442\u0435\u0436\u0438 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043a \u0441\u0442\u0435\u043d\u0430\u043c.<\/p>\n<pre><code class=\"ruby\"># \u0427\u0435\u0440\u0442\u0435\u0436\u0438 \u043a\u0438\u0440\u043f\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u0435\u043d\u044b (BrickWall) describe BrickWall do   let(:brick_wall) { BrickWall.new }    it 'should state its dimensions' do     brick_wall.dimensions.must_equal 'I am 30ft. long and 20ft. wide!'   end    it 'should be made from brick' do     brick_wall.made_from.must_equal 'I am made from brick!'   end end  # \u0427\u0435\u0440\u0442\u0435\u0436\u0438 \u0431\u0435\u0442\u043e\u043d\u043d\u043e\u0439 \u0441\u0442\u0435\u043d\u044b (ConcreteWall) describe ConcreteWall do   let(:concrete_wall) { ConcreteWall.new }    it 'should state its dimensions' do     concrete_wall.dimensions.must_equal 'I am 30ft. long and 20ft. wide!'   end    it 'should be made from concrete' do     concrete_wall.made_from.must_equal 'I am made from concrete!'   end end  # \u0427\u0435\u0440\u0442\u0435\u0436\u0438 \u0434\u0435\u0440\u0435\u0432\u044f\u043d\u043d\u043e\u0439 \u0441\u0442\u0435\u043d\u044b (WoodWall) describe WoodWall do   let(:wood_wall) { WoodWall.new }    it 'should state its dimensions' do     wood_wall.dimensions.must_equal 'I am 10ft. long and 20ft. wide!'   end    it 'should be made from wood' do     wood_wall.made_from.must_equal 'I am made from wood!'   end end <\/code><\/pre>\n<p>  \u0425\u043c\u2026 \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0434\u0435\u0439 \u043f\u0440\u043e\u043c\u0435\u043b\u044c\u043a\u043d\u0443\u043b\u043e \u0443 \u043d\u0430\u0441 \u0432 \u0433\u043e\u043b\u043e\u0432\u0430\u0445. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u0442\u0435\u043d\u044b (<code>Wall<\/code>) \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441 \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0436\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 <code>BrickWall<\/code>, <code>ConcreteWall<\/code> \u0438 <code>WoodWall<\/code>. \u041f\u043e\u0445\u043e\u0436\u0435 \u0438\u0434\u0435\u0439\u043a\u0430 \u0442\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u0430\u044f, \u043d\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u043c \u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434. \u0427\u0442\u043e \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u0434\u043e\u043c\u0430 \u043d\u0443\u0436\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u044e\u0436\u0438\u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0441\u0442\u0435\u043d?<\/p>\n<h3>\u041e\u0442\u043a\u0440\u043e\u0439-\u043a\u0430 \u0432\u043e\u043d \u0442\u0443 \u043a\u043e\u0440\u043e\u0431\u043e\u0447\u043a\u0443!<\/h3>\n<p>  \u041f\u043e\u0441\u0451\u0440\u0431\u044b\u0432\u0430\u044f \u043d\u0430\u0448 \u043f\u043e\u0441\u043b\u0435\u043e\u0431\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0444\u0435, \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438 \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u2014 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0428\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044f \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0443 \u0428\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 <strong>\u0441\u043a\u0435\u043b\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430<\/strong> (sceletal class) \u0437\u0430\u043b\u043e\u0436\u0438\u0442 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442 \u0434\u043b\u044f <strong>\u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/strong> (subclasses) \u0438\u043b\u0438 <strong>\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/strong> (concrete classes). \u0421\u043e \u0441\u043a\u0435\u043b\u0435\u0442\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0438\u0434\u0443\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u0445. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043a\u043b\u0430\u0441\u0441 <code>Wall<\/code> (\u043d\u0430\u0448 \u0441\u043a\u0435\u043b\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441) \u0438 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b: <code>BrickWall<\/code>, <code>ConcreteWall<\/code> \u0438 <code>WoodWall<\/code>.<\/p>\n<p>  \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0447\u0435\u0440\u0442\u0435\u0436\u0438 \u043c\u044b \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0432\u0441\u0435 \u0442\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u0442\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043c\u0435\u0442\u043e\u0434\u044b <code>#dimensions<\/code> \u0438 <code>#made_from<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u044d\u0442\u043e\u0433\u043e, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 \u0441\u0442\u0435\u043d\u044b \u0438 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<pre><code class=\"ruby\">class Wall   def dimensions     &quot;I am #{length}ft. long and #{width}ft. wide!&quot;   end    def made_from     &quot;I am made from #{material}!&quot;   end    private    def length     30   end end  class BrickWall &lt; Wall   private    def width     20   end    def material     'brick'   end end  class ConcreteWall &lt; Wall   private    def width     20   end    def material     'concrete'   end end  class WoodWall &lt; Wall   private    def length     10   end    def width     20   end    def material     'wood'   end end <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<h3>Hook \u043c\u0435\u0442\u043e\u0434\u044b<\/h3>\n<p>  \u0412 \u043a\u043b\u0430\u0441\u0441\u0435 <code>Wall<\/code> \u0443 \u043d\u0430\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <code>#length<\/code> \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e <code>BrickWall<\/code> \u0438 <code>ConcreteWall<\/code> \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0443\u044e \u0434\u043b\u0438\u043d\u0443. \u0427\u0442\u043e \u0436\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u0430 <code>WoodWall<\/code>, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 <code>#length<\/code> \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>10<\/code>. \u042d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 hook \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n<p>  Hook \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0446\u0435\u043b\u0435\u0439:<br \/>  1) \u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043a\u0435\u043b\u0435\u0442\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435<br \/>  2) \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435 \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u0441\u043a\u0435\u043b\u0435\u0442\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u043d\u0430\u0441 \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u0431\u044b\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"ruby\">class Wall    ...    private    def length     raise NotImplementedError, 'Sorry, you have to override length'   end end  class BrickWall &lt; Wall   private    ...    def length     30   end end <\/code><\/pre>\n<p>  <em>(\u043f\u0440\u0438\u043c. \u043f\u0435\u0440. \u2014 \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u0438 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u043b\u0443\u0447\u0448\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0434\u043b\u044f ruby, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/practicingruby.com\/articles\/shared\/yfildjshgzew\">\u0442\u0443\u0442<\/a>, \u0440\u0430\u0437\u0434\u0435\u043b &quot;Never Require Inheritance&quot;)<\/em><\/p>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435, \u043c\u0435\u0442\u043e\u0434 <code>#length<\/code> \u043a\u043b\u0430\u0441\u0441\u0430 <code>Wall<\/code> \u0441\u0434\u0435\u043b\u0430\u043d \u043a\u0430\u043a \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430 \u0434\u043b\u044f <code>#lenght<\/code> \u0432 <code>BrickWall<\/code>, \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435. \u041f\u043e \u0441\u0443\u0442\u0438, hook \u043c\u0435\u0442\u043e\u0434 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d. \u0415\u0441\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430, \u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c hook \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<h2>\u0422\u0430\u043a\u0438\u0435 \u0432\u043e\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0441\u0442\u0435\u043d\u044b<\/h2>\n<p>  \u041d\u0430\u0448 \u043f\u0440\u043e\u0440\u0430\u0431 \u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0442\u0440\u0443\u0434\u0430 \u0438 \u043f\u043e\u0436\u0430\u043b\u0443\u0439 \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u044b \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c. \u041a\u0430\u043a \u043c\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0428\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 hook \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u0445. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u043b\u044e\u0431\u0443\u044e \u043c\u044b\u0441\u043b\u0438\u043c\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043d\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u0434 \u0432 \u0447\u0438\u0441\u0442\u043e\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f (Strategy method). \u041e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0441\u0432\u044f\u0437\u0438!   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/188046\/\"> http:\/\/habrahabr.ru\/post\/188046\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0444\u0442\u0430 \u0440\u0430\u0441\u0442\u0435\u0442, \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0443\u0445\u0432\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0437\u0430 \u043d\u043e\u0432\u0435\u0439\u0448\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0440\u0435\u043c\u0435\u0441\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u044f\u0437\u044b\u043a\u043e-\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043f\u043e\u0441\u0442\u043e\u0432 \u043c\u044b \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u043c\u043e\u0449\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0432\u0435\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u042f \u043d\u0430\u0441\u0442\u0440\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043a\u043d\u0438\u0433\u0443 Russ Olsen \u2014 Design Patterns in Ruby. \u041d\u0430\u0448 \u0446\u0438\u043a\u043b \u043f\u043e\u0441\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u0440\u043f\u0430\u0442\u044c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043e\u0442\u0442\u0443\u0434\u0430 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u043c-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u043a\u0440\u0430\u0442\u043a\u043e\u0439 \u0432\u044b\u0436\u0438\u043c\u043a\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0442\u043e \u0447\u0442\u043e \u0432\u044b \u0447\u0438\u0442\u0430\u0435\u0442\u0435 (\u0430 \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043d\u0430 \u044d\u0442\u043e!), \u043a\u043d\u0438\u0433\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>  \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c. \u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u044f\u044f \u0442\u0435\u043c\u0430 \u2014 \u0428\u0430\u0431\u043b\u043e\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.  <\/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-188046","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/188046","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=188046"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/188046\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=188046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=188046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=188046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}