{"id":3560,"date":"2019-09-03T07:23:00","date_gmt":"2019-09-03T07:23:00","guid":{"rendered":"http:\/\/the-codest.localhost\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/"},"modified":"2026-04-27T09:52:00","modified_gmt":"2026-04-27T09:52:00","slug":"ruby-3-0-ruby-og-minna-thekktar-adferdir-til-personuverndarstyringar","status":"publish","type":"post","link":"https:\/\/thecodest.co\/is\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/","title":{"rendered":"Ruby 3.0. Ruby og minna \u00feekktar a\u00f0fer\u00f0ir til stj\u00f3rnunar pers\u00f3nuverndar"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Grunnlausnir<\/h2>\n\n\n\n<p>Segjum a\u00f0 vi\u00f0 s\u00e9um a\u00f0 nota class Foo sem hefur eina almenna a\u00f0fer\u00f0 og eina einkaa\u00f0fer\u00f0:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Foo\n  def bar\n    :awesome\n  end\n\u200b\n  private\n\u200b\n  def baz\n    :something_private\n  end\nend<\/code><\/pre>\n\n\n\n<p>Allt er fr\u00e1b\u00e6rt, vi\u00f0 sj\u00e1um sl\u00edka lausn \u00ed n\u00e1nast hverju <a href=\"https:\/\/thecodest.co\/is\/dictionary\/why-do-projects-fail\/\">verkefni<\/a>. Hlaup <code>Foo.new.baz<\/code> mun valda villunni <em>NoMethodError (einkaa\u00f0fer\u00f0in \u2018baz\u2019 k\u00f6llu\u00f0 fyrir #)<\/em> og \u00fea\u00f0 var einmitt \u00fea\u00f0 sem vi\u00f0 \u00e6tlu\u00f0um a\u00f0 gera. Hva\u00f0 gerist ef vi\u00f0 reynum a\u00f0 breyta sni\u00f0inu fyrir vistun og b\u00e6ta vi\u00f0 private sem forli\u00f0 \u00ed flokksskilgreiningunni?<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Foo\n  def bar\n    :awesome\n  end\n\u200b\n  private def baz\n    :something_private\n  end\nend<\/code><\/pre>\n\n\n\n<p>Eins og \u00fe\u00fa s\u00e9r\u00f0 eftir a\u00f0 hafa keyrt <a href=\"https:\/\/thecodest.co\/is\/dictionary\/what-is-code-refactoring\/\">k\u00f3\u00f0i<\/a>, \u00feetta virkar reyndar! Hvers vegna getum vi\u00f0 komist inn \u00ed s\u00fdnileika a\u00f0fer\u00f0arinnar \u00e1\u00f0ur en vi\u00f0 framkv\u00e6mum hana? Vegna \u00feess a\u00f0 \u00feegar a\u00f0fer\u00f0 er skilgreind skilar `def` nafni a\u00f0fer\u00f0arinnar sem t\u00e1kni. \u00deetta tj\u00e1ning er ekki a\u00f0eins hluti af m\u00e1lfarinu, heldur de facto a\u00f0fer\u00f0 sem er aflei\u00f0ing `Module`-flokksins og me\u00f0h\u00f6ndlar \u00feetta t\u00e1kn sem r\u00f6k. Fyrir frekari uppl\u00fdsingar, sj\u00e1\u00f0u skj\u00f6lin. <a href=\"https:\/\/ruby-doc.org\/core-3.0.0\/Module.html#method-i-private\">\u00ed \u00feessum hlekk<\/a>. \u00dear sem \u00feetta byrja\u00f0i svo au\u00f0veldlega me\u00f0 private, skulum vi\u00f0 reyna a\u00f0 breyta s\u00fdnileika private-a\u00f0fer\u00f0arinnar.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Foo\n  def bar\n    :awesome\n  end\n\u200b\n  private def baz\n    :something_private\n  end\n\u200b\n  public :baz\nend<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Hva\u00f0 mun gerast eftir a\u00f0 k\u00f3\u00f0anum er keyrt?<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">irb(main):012:0&gt; Foo.new.baz\n=&gt; :something_private<\/code><\/pre>\n\n\n\n<p>\u00c1rangur! A\u00f0fer\u00f0 okkar vi\u00f0 grunnl\u00ednur var\u00f0 opinber vegna \u00feess a\u00f0 vi\u00f0 ger\u00f0um hana s\u00fdnilega tvisvar. Au\u00f0vita\u00f0 gildir sama a\u00f0ger\u00f0 um einingarnar.<br>\u200b<br>Fr\u00e1b\u00e6rt, en hvar f\u00e6r \u00fea\u00f0? <a href=\"https:\/\/thecodest.co\/is\/blog\/why-us-companies-are-opting-for-polish-developers\/\">okkur<\/a>?<br>\u200b<br>\u00deessi virkni gefur okkur miki\u00f0, \u00fev\u00ed vi\u00f0 getum frj\u00e1lslega breytt s\u00fdnileika a\u00f0fer\u00f0ar \u00e1 me\u00f0an vi\u00f0 skilgreinum hana, e\u00f0a jafnvel breytt s\u00fdnileika a\u00f0fer\u00f0a \u00feegar vi\u00f0 erfum \u00fe\u00e6r.<\/p>\n\n\n\n<p>N\u00fa skulum vi\u00f0 l\u00edta \u00e1 hva\u00f0 <a href=\"https:\/\/thecodest.co\/is\/blog\/hire-ror-developer\/\">R\u00fab\u00edn<\/a> 2.7 getur gert var\u00f0andi a\u00f0 breyta s\u00fdnileika aliasa og a\u00f0gangsbreyta.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Foo\n  private attr_accessor :awesome_variable\nend<\/code><\/pre>\n\n\n\n<p>\u00dev\u00ed mi\u00f0ur f\u00e1um vi\u00f0 villu \u00fear sem einkamet\u00f3\u00f0i gerir r\u00e1\u00f0 fyrir t\u00e1knum og attr_accessor. K\u00f3\u00f0inn skilar nil og \u00feess vegna er \u00feessi a\u00f0fer\u00f0 ekki samh\u00e6f\u00f0 einkanotkun \u00ed Ruby 2.7. Hva\u00f0a valkosti h\u00f6fum vi\u00f0?<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Vi\u00f0 getum nota\u00f0 attr_accessor undir lykilor\u00f0inu private til a\u00f0 l\u00e1ta \u00fea\u00f0 virka, \u00fe.e. vi\u00f0 f\u00e1um villu \u00feegar vi\u00f0 reynum a\u00f0 v\u00edsa til <code>fr\u00e1b\u00e6r_breytilegfr\u00e1b\u00e6r_breytileg<\/code> a\u00f0fer\u00f0.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Foo\n  private\n\u200b\n  attr_accessor :awesome_variable\nend<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>\u00d6nnur kosturinn er a\u00f0 framkv\u00e6ma einkava\u00f0fer\u00f0ina \u00e1 a\u00f0fer\u00f0um sem b\u00fai\u00f0 er til af <code>eiginleiki_eiginleiki<\/code>; \u00ed \u00feessu tilfelli ver\u00f0um vi\u00f0 l\u00edka a\u00f0 muna a\u00f0 setja setterinn \u00fear inn.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Foo\n  attr_accessor :awesome_variable\n\u200b\n  private :awesome_variable, :awesome_variable=\nend<\/code><\/pre>\n\n\n\n<p>Vandam\u00e1l me\u00f0 <code>eiginleiki_ *<\/code> A\u00f0fer\u00f0irnar eru ekki einu hindranirnar. Vi\u00f0 getum lent \u00ed s\u00f6mu erfi\u00f0leikum \u00feegar vi\u00f0 viljum b\u00faa til einkannaf.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Foo\n  private alias :bar, :awesome_bar\nend<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ruby 3.0 og fyrirt\u00e6ki\u00f0 okkar<\/h2>\n\n\n\n<p>Sem betur fer kynnir Ruby 3.0 mikla breytingu \u00fear sem s\u00fdnileikara\u00f0fer\u00f0ir geta teki\u00f0 fylki sem r\u00f6k og a\u00f0fer\u00f0ir eins og alias og attr_* geta endurstillt fylki\u00f0 me\u00f0 n\u00f6fnum \u00feeirra a\u00f0fer\u00f0a sem hafa veri\u00f0 skilgreindar. \u00de\u00fa getur lesi\u00f0 meira <a href=\"https:\/\/redmine.ruby-lang.org\/issues\/17314\">h\u00e9r<\/a>.<\/p>\n\n\n\n<p>N\u00fa skulum vi\u00f0 sko\u00f0a nokkur d\u00e6mi \u00ed n\u00fdjustu euba og athuga hvort breytingarnar hafi \u00ed raun veri\u00f0 ger\u00f0ar og hvernig vi\u00f0 getum nota\u00f0 \u00fe\u00e6r.<br>\u200b<br>\u00cd fyrsta d\u00e6minu skulum vi\u00f0 nota private fyrir framan attr-a\u00f0gangara\u00f0ila:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Foo\n  private attr_accessor :awesome_variable\nend<\/code><\/pre>\n\n\n\n<p>Sl\u00edk k\u00f6llun mun ekki valda villum vi\u00f0 greiningu setningarfr\u00e6\u00f0innar og, sem skiptir m\u00e1li, <code>fr\u00e1b\u00e6r_breytilegur<\/code> og<code>awesome_variable =<\/code>a\u00f0fer\u00f0ir ver\u00f0a einkaa\u00f0fer\u00f0ir.<br>\u200b<br>alias-a\u00f0fer\u00f0in gerir \u00fea\u00f0 sama og \u00e1\u00f0ur; h\u00fan skilar n\u00fa einnig t\u00e1kni sem nafni n\u00fdrrar a\u00f0fer\u00f0ar og gerir hana s\u00fdnilega.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Foo\n  private alias :bar, :awesome_bar\nend<\/code><\/pre>\n\n\n\n<p>\u00c1hugaver\u00f0 sta\u00f0reynd er a\u00f0 vi\u00f0 getum einnig kafa\u00f0 d\u00fdpra \u00ed frekari a\u00f0fer\u00f0ir, t.d. hi\u00f0 fr\u00e1b\u00e6ra<em>prent-einingu m\u00e1 kalla \u00e1 milli private og attr<\/em>lesari; \u00fea\u00f0 er mikilv\u00e6gt a\u00f0 sl\u00edk a\u00f0fer\u00f0 skili fylki me\u00f0 n\u00f6fnum a\u00f0fer\u00f0anna sem eru til h\u00e6gri \u00ed tj\u00e1ningunni.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">class Module\n  def awesome_print(names)\n    puts names\n    names\n  end\nend\nclass Foo\n  private awesome_print attr_reader :awesome_bar\nend<span style=\"background-color: initial; font-family: inherit; font-size: inherit;\"> <\/span><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Yfirlit<\/h2>\n\n\n\n<p>Vonandi finnur \u00fe\u00fa \u00feessa grein gagnlega! Ef fleiri fr\u00e9ttir berast um Ruby 3.0, lestu meira. <a href=\"https:\/\/rubyreferences.github.io\/rubychanges\/3.0.html\">h\u00e9r<\/a>.<\/p>\n\n\n\n<p>Gle\u00f0ilega forritun!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/thecodest.co\/careers#offers]\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/ruby-1-.png\" alt=\"Tilbo\u00f0 fyrir Ruby-\u00fer\u00f3unara\u00f0ila\"\/><\/a><\/figure>\n\n\n\n<p><strong>Lesa meira:<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/shut-up-and-take-your-money-1-hidden-costs-and-real-agility-in-product-development-process\/\">\u00deeg\u00f0u og taktu peningana \u00fe\u00edna #1: Falinn kostna\u00f0ur og raunveruleg sveigjanleiki \u00ed v\u00f6ru\u00fer\u00f3unarferli<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/thecodest.co\/blog\/cto-challenges-scale-up-and-growth-of-software-products\/\">CTO \u00e1skoranir \u2013 st\u00e6kkun og v\u00f6xtur hugb\u00fana\u00f0arafur\u00f0a<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Ein af \u00e1sts\u00e6lustu eiginleikum Ruby er afar sveigjanleg setningager\u00f0 hennar. Pers\u00f3nulega elska \u00e9g Ruby fyrir hversu margar m\u00f6guleikar vi\u00f0 h\u00f6fum til a\u00f0 skilgreina flokka og eiginleika \u00feeirra, og um \u00fea\u00f0 mun \u00e9g fjalla \u00ed \u00feessari grein.<\/p>","protected":false},"author":2,"featured_media":3561,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-3560","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Ruby 3.0. Ruby and lesser known privacy control methods - The Codest<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/is\/blogg\/ruby-3-0-ruby-og-minna-thekktar-adferdir-til-personuverndarstyringar\/\" \/>\n<meta property=\"og:locale\" content=\"is_IS\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ruby 3.0. Ruby and lesser known privacy control methods\" \/>\n<meta property=\"og:description\" content=\"One of the most beloved features of Ruby is its very flexible syntax. Personally, I love Ruby for how many possibilities we have in defining classes and their properties, and this is what I will discuss in this article.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/is\/blogg\/ruby-3-0-ruby-og-minna-thekktar-adferdir-til-personuverndarstyringar\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-03T07:23:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-27T09:52:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_3.0.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"thecodest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"thecodest\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/\"},\"author\":{\"name\":\"thecodest\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\"},\"headline\":\"Ruby 3.0. Ruby and lesser known privacy control methods\",\"datePublished\":\"2019-09-03T07:23:00+00:00\",\"dateModified\":\"2026-04-27T09:52:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/\"},\"wordCount\":588,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby_3.0.png\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"is\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/\",\"name\":\"Ruby 3.0. Ruby and lesser known privacy control methods - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby_3.0.png\",\"datePublished\":\"2019-09-03T07:23:00+00:00\",\"dateModified\":\"2026-04-27T09:52:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/#breadcrumb\"},\"inLanguage\":\"is\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"is\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby_3.0.png\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby_3.0.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ruby 3.0. Ruby and lesser known privacy control methods\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"is\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"is\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\",\"name\":\"thecodest\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"is\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"caption\":\"thecodest\"},\"url\":\"https:\\\/\\\/thecodest.co\\\/is\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ruby 3.0. Ruby og minna \u00feekktar a\u00f0fer\u00f0ir til pers\u00f3nuverndar \u2013 The Codest","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thecodest.co\/is\/blogg\/ruby-3-0-ruby-og-minna-thekktar-adferdir-til-personuverndarstyringar\/","og_locale":"is_IS","og_type":"article","og_title":"Ruby 3.0. Ruby and lesser known privacy control methods","og_description":"One of the most beloved features of Ruby is its very flexible syntax. Personally, I love Ruby for how many possibilities we have in defining classes and their properties, and this is what I will discuss in this article.","og_url":"https:\/\/thecodest.co\/is\/blogg\/ruby-3-0-ruby-og-minna-thekktar-adferdir-til-personuverndarstyringar\/","og_site_name":"The Codest","article_published_time":"2019-09-03T07:23:00+00:00","article_modified_time":"2026-04-27T09:52:00+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_3.0.png","type":"image\/png"}],"author":"thecodest","twitter_card":"summary_large_image","twitter_misc":{"Written by":"thecodest","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/#article","isPartOf":{"@id":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/"},"author":{"name":"thecodest","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76"},"headline":"Ruby 3.0. Ruby and lesser known privacy control methods","datePublished":"2019-09-03T07:23:00+00:00","dateModified":"2026-04-27T09:52:00+00:00","mainEntityOfPage":{"@id":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/"},"wordCount":588,"commentCount":0,"publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"image":{"@id":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_3.0.png","articleSection":["Software Development"],"inLanguage":"is","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/","url":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/","name":"Ruby 3.0. Ruby og minna \u00feekktar a\u00f0fer\u00f0ir til pers\u00f3nuverndar \u2013 The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/#primaryimage"},"image":{"@id":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_3.0.png","datePublished":"2019-09-03T07:23:00+00:00","dateModified":"2026-04-27T09:52:00+00:00","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/#breadcrumb"},"inLanguage":"is","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/"]}]},{"@type":"ImageObject","inLanguage":"is","@id":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/#primaryimage","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_3.0.png","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_3.0.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/blog\/ruby-3-0-ruby-and-lesser-known-privacy-control-methods\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"Ruby 3.0. Ruby and lesser known privacy control methods"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"is"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"is","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]},{"@type":"Person","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76","name":"thecodest","image":{"@type":"ImageObject","inLanguage":"is","@id":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","caption":"thecodest"},"url":"https:\/\/thecodest.co\/is\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/posts\/3560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/comments?post=3560"}],"version-history":[{"count":14,"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/posts\/3560\/revisions"}],"predecessor-version":[{"id":7980,"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/posts\/3560\/revisions\/7980"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/media\/3561"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/media?parent=3560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/categories?post=3560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/tags?post=3560"}],"curies":[{"name":"vp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}