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)


31
32
33
# File 'lib/flutter_rb/project/specs/ios/podspec.rb', line 31

def initialize(path)
  @path = path
end

Instance Method Details

#parsePodspec

Returns:



36
37
38
39
40
41
42
43
44
45
# File 'lib/flutter_rb/project/specs/ios/podspec.rb', line 36

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