小编Xin*_*ang的帖子

我应该禁用Chocolatey安装的软件包的内置自动更新吗?

例如,我使用Chocolatey安装了Chrome.我是否需要关闭Chrome的自动更新,并且cup upgrade只能使用?

chocolatey

4
推荐指数
1
解决办法
1167
查看次数

在 Ruby 中调用超级模块中的重写方法

在以下代码中,Parent#just_do覆盖GrandParent#just_do. 在Me课堂上,如何打电话GrandParent#just_do

module GrandParent
  def just_do
    puts "GrandParent"
  end
end

module Parent
  def self.included(base)
    base.extend ClassMethods
  end

  module ClassMethods
    include GrandParent

    def just_do
      puts "Parent"
    end
  end
end

class Me
  include Parent

  def self.just_do
    super # this calls Parent#just_do
  end
end
Run Code Online (Sandbox Code Playgroud)

ruby methods module super

1
推荐指数
1
解决办法
1244
查看次数

标签 统计

chocolatey ×1

methods ×1

module ×1

ruby ×1

super ×1