{"componentChunkName":"component---node-modules-gatsby-theme-medium-to-own-blog-src-templates-blog-post-js","path":"/ruby-not-so-bad/","result":{"data":{"site":{"siteMetadata":{"siteUrl":"https://javame.netlify.app","githubUrl":"https://github.com/aterreno/blog"}},"mdx":{"fields":{"slug":"/ruby-not-so-bad/"},"excerpt":"Yuppie, finally I have a project and looks nice, we have to use Ruby on Rails and Ajax, so I’m forced to study a bit this language and the…","timeToRead":1,"frontmatter":{"title":"Ruby… Not so bad…","description":"","categories":[],"date":"October 25, 2006","canonical_link":"https://javame.netlify.app//ruby-not-so-bad-5d9854d0b25b"},"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Ruby… Not so bad…\",\n  \"description\": \"\",\n  \"date\": \"2006-10-25T00:00:00.000Z\",\n  \"categories\": [],\n  \"published\": true,\n  \"canonical_link\": \"https://javame.netlify.app//ruby-not-so-bad-5d9854d0b25b\",\n  \"redirect_from\": [\"/ruby-not-so-bad-5d9854d0b25b\"]\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"Yuppie, finally I have a project and looks nice, we have to use Ruby on Rails and Ajax, so I\\u2019m forced to study a bit this language and the framework.\"), mdx(\"p\", null, \"I\\u2019m reading \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"http://www.amazon.co.uk/Agile-Development-Rails-Dave-Thomas/dp/097669400X/ref=sr_11_1/203-8945782-5143904\",\n    \"target\": \"_blank\",\n    \"rel\": \"nofollow noopener noreferrer\"\n  }), \"Agile Web Development with Rails\"), \", really a good book and after a lazy mac os intallation of \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"http://locomotive.raaum.org/\",\n    \"target\": \"_blank\",\n    \"rel\": \"nofollow noopener noreferrer\"\n  }), \"Locomotive\"), \" + \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"http://www.radrails.org/\",\n    \"target\": \"_blank\",\n    \"rel\": \"nofollow noopener noreferrer\"\n  }), \"RadRails\"), \", I\\u2019ve moved to a more \\u201Chacking\\u201D installation following the good tutorial on the blog of \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"http://blog.duncandavidson.com/2006/04/sandboxing_rail.html\",\n    \"target\": \"_blank\",\n    \"rel\": \"nofollow noopener noreferrer\"\n  }), \"James Dunkan\"), \".\"), mdx(\"p\", null, \"Right now I\\u2019m blocking cos the installation, done using ports takes really ages, compliling and downloading what\\u2019s needed\\u2026\"), mdx(\"p\", null, \"There are some \\u201Cfeatures\\u201D that I really like of Ruby, for example all member variables are private, to access it you have to write a getter, using the keyword attr, if you want only getter just write attr\", \"_\", \"reader\"), mdx(\"p\", null, \"[ruby]\"), mdx(\"p\", null, \"class Blog\", mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"def initialize(title)\", mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"@title = title\", mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"end\", mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"attr\", \"_\", \"reader\\xA0:title\"), mdx(\"p\", null, \"[/ruby]\"), mdx(\"p\", null, \"Nice no?\"), mdx(\"p\", null, \"Another cool thing is that Ruby does not have Multiple Inheritance by the way it has the module concept, so you can have methods for free from another class.\"), mdx(\"p\", null, \"A stupid example can be something like this:\"), mdx(\"p\", null, \"[ruby]\"), mdx(\"p\", null, \"module WebPage\", mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"def WebPage.toHtml\"), mdx(\"h3\", {\n    \"id\": \"\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#\",\n    \"aria-label\": \" permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  })))), \"\\u2026\"), mdx(\"p\", null, \"end\"), mdx(\"p\", null, \"class Blog\", mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", \"require \\u2018WebPage\\u2019\"), mdx(\"p\", null, \"[/ruby]\"), mdx(\"p\", null, \"An you\\u2019ll be able to use that Method on the Blog class.\"));\n}\n;\nMDXContent.isMDXComponent = true;"},"allWebMentionEntry":{"nodes":[]}},"pageContext":{"id":"0b0e9f1c-c9fb-51ea-9050-f52d8da5b09b","previous":{"id":"1d816d82-4160-5853-afe8-0486ead01b83","fields":{"slug":"/domain-driven-design-what-is-it/","published":true},"frontmatter":{"redirect_from":["/domain-driven-design-what-is-it-75e63fc29a1c"],"redirect_to":null,"title":"Domain-driven Design: What Is It?"}},"next":{"id":"feb5ef1f-33ad-529d-aa03-de03118b0e8f","fields":{"slug":"/ruby-rails-web20-a-blog-archive-a-sometimes-less-is-more/","published":true},"frontmatter":{"redirect_from":["/ruby-rails-web2-0-â-blog-archive-â-sometimes-less-is-more-510000c56a8a"],"redirect_to":null,"title":"Ruby, Rails, Web2.0 Â» Blog Archive Â» Sometimes less is more"}},"permalink":"https://javame.netlify.app/ruby-not-so-bad/","themeOptions":{"plugins":[],"config":{"title":"Antonio Terreno","description":"Antonio Terreno's blog archive","shortBio":"","bio":"Principal Consultant at Equal Experts","author":"Antonio Terreno","githubUrl":"https://github.com/aterreno/blog","siteUrl":"https://javame.netlify.app/","social":{"twitter":"javame","medium":"","facebook":"","github":"aterreno","linkedin":"antonioterreno","instagram":"tritonitri"},"goatCounterCode":null}}}},"staticQueryHashes":["4131332129","645483741"]}