Class: Pod::Command::Dep
- Inherits:
-
Pod::Command
- Object
- Pod::Command
- Pod::Command::Dep
- Defined in:
- lib/core_blur/command/dep.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Dep
constructor
A new instance of Dep.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ Dep
Returns a new instance of Dep.
17 18 19 20 21 22 23 |
# File 'lib/core_blur/command/dep.rb', line 17 def initialize(argv) super puts "插件版本号: #{PodfileDep::VERSION}" @name = argv.option('name') @sort_count = argv.flag?('sort', false) @forward = argv.flag?('forward', false) end |
Class Method Details
.options ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/core_blur/command/dep.rb', line 10 def self. [ %w[--name=xx xx为要查询的组件的名字], %w[--sort 输出依赖时按数量从小到大排序], %w[--forward 输出正向依赖], ].concat(super).reject { |(name, _)| (name == '--no-ansi' or name == '--silent' or name == '--allow-root' or name == '--verbose') } end |