Class: FlutterRb::PodspecParser

Inherits:
Object
  • Object
show all
Defined in:
lib/flutter_rb/project/specs/ios/podspec.rb

Overview

Podspec parser

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ PodspecParser

Returns a new instance of PodspecParser.

Parameters:

  • path (String)


27
28
29
# File 'lib/flutter_rb/project/specs/ios/podspec.rb', line 27

def initialize(path)
  @path = path
end

Instance Method Details

#parsePodspec

Returns:



32
33
34
35
36
37
38
39
40
41
# File 'lib/flutter_rb/project/specs/ios/podspec.rb', line 32

def parse
  podspec = Pod::Specification.from_file(@path)
  @podspec = Podspec.new(
    @path,
    podspec.name,
    podspec.version.version,
    podspec.authors.nil? ? podspec.author : podspec.authors,
    podspec.source
  )
end