Ruby call method to include instance variables

后端 未结 0 1081
逝去的感伤
逝去的感伤 2020-12-02 23:40

I want to have ability to call below class by different methods.

class SumClass
  def initialize(data)
    @day = data[:day]
    @sum_type = data[:sum_type]
          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题