{"image_url":null,"author_name":"snoozer-05","author_url":"https://blog.hatena.ne.jp/snoozer-05/","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","categories":["ruby","\u30d1\u30bf\u30fc\u30f3"],"url":"https://snoozer-05.hatenadiary.org/entry/20070821/1187701437","version":"1.0","type":"rich","width":"100%","blog_title":"Standing on the shoulder of giants","published":"2007-08-21 22:03:57","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsnoozer-05.hatenadiary.org%2Fentry%2F20070821%2F1187701437\" title=\"Setting Method - Standing on the shoulder of giants\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"Setting Method","blog_url":"https://snoozer-05.hatenadiary.org/","height":"190","description":"\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5909\u6570\u3068\u540c\u3058\u540d\u524d\u306e\u5909\u6570\u306e\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u308a\u307e\u3057\u3087\u3046\u3002 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5909\u6570\u306b\u95a2\u3059\u308b\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002 Indirect Variable Access\u3067\u4f7f\u7528\u3059\u308b\u30a2\u30af\u30bb\u30b5\u306e\u3046\u3061\u3001\u8a2d\u5b9a\u3092\u884c\u3046\u3082\u306e\u3092Setting Method\u3068\u3044\u3044\u307e\u3059\u3002 class Point attr_accessor :x, :y def initialize(x, y) @x = x @y = y end end point = Point.new(10, 5) point.x = 5 # => 5 Setting Method\u306e\u307f\u3092\u5b9f\u73fe\u3057\u305f\u3044\u5834\u5408\u306f\u3001attr_writer\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 class Point a\u2026"}