Class: Pod::Command::Privacy::Spec

Inherits:
Pod::Command::Privacy show all
Defined in:
lib/cocoapods-privacy/command/privacy/spec.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Spec

Returns a new instance of Spec.



15
16
17
18
# File 'lib/cocoapods-privacy/command/privacy/spec.rb', line 15

def initialize(argv)
    @podspec_file = argv.arguments!.first
    super
end

Instance Method Details

#runObject



27
28
29
# File 'lib/cocoapods-privacy/command/privacy/spec.rb', line 27

def run
    PrivacyModule.load_module(@podspec_file)
end

#validate!Object



20
21
22
23
24
25
# File 'lib/cocoapods-privacy/command/privacy/spec.rb', line 20

def validate!
    @podspec_file =  @podspec_file ?  @podspec_file : PrivacyUtils.podspec_file_path
    unless @podspec_file && !@podspec_file.empty?
      raise Informative, 'no podspec file were found, please run pod privacy podspec_file_path'   
    end
end