Class: Pod::Command::X::Repo

Inherits:
Pod::Command::X show all
Extended by:
Executable
Defined in:
lib/cocoapods-x/command/repo.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Repo

Returns a new instance of Repo.



21
22
23
24
25
# File 'lib/cocoapods-x/command/repo.rb', line 21

def initialize(argv)
    @name = argv.shift_argument
    @wipe_terminal = argv.flag?('terminal')
    super
end

Class Method Details

.optionsObject



15
16
17
18
19
# File 'lib/cocoapods-x/command/repo.rb', line 15

def self.options
    [
        ['--terminal', 'Use terminal open pod']
    ].concat(super)
end

Instance Method Details

#runObject



27
28
29
30
31
32
33
# File 'lib/cocoapods-x/command/repo.rb', line 27

def run
    pods = Pod::X::Sandbox::workspace::all_pods
    if !@name.nil? && @name.size > 0
        pods = pods.select{ |pod| pod.name == @name }
    end
    open_pods pods
end