ä¼ç¤¾ã§è°è«ã«ãªããæªã ã«ç§ã®ä¸ã§æ±ºçãã¤ãã¦ããªãåé¡ãåãä¸ãã¦ã¿ã¾ãã Rubyã®ã¤ã³ã¹ã¿ã³ã¹å¤æ°ãç´æ¥åç §ãããã¨ã«ã¤ãã¦ã§ãã ä¾ãã°ãã³ã³ã¹ãã©ã¯ã¿ã§ã¤ã³ã¹ã¿ã³ã¹å¤æ°ãè¨å®ãã¾ãã ããã¦ãã¤ã³ã¹ã¿ã³ã¹ã¡ã½ããã§ãã®ã¤ã³ã¹ã¿ã³ã¹å¤æ°ãç´æ¥åç §ãã¦å¦çããã¦å¤ãè¿å´ããã¨ãããã¨ããã¾ãã è¯ãä¾ã§ã¯ãªãããããã¾ãããããããªæãã®ã¤ã¡ã¼ã¸ã§ãã class PriceCalculation def initialize(price, tax) @price = price @tax = tax end def tax_included_price @price * (1 + @tax) end end åæã¨ãã¦ã@priceã@taxã¯ãã®ã¯ã©ã¹å ã®ã¿ã§ä½¿ç¨ãããå¤é¨ããã¯åç §ãããªããã®ã¨ãã¾ãã ããã«å¯¾ããååã®ãã¤ã人ãã¤ã³ã¹ã¿ã³ã¹å¤æ°ãç´æ¥åç §ããã®ã¯è¯ããªãããã
{{#tags}}- {{label}}
{{/tags}}