Class: FlutterRb::PodspecParser
- Inherits:
-
Object
- Object
- FlutterRb::PodspecParser
- Defined in:
- lib/flutter_rb/project/specs/ios/podspec.rb
Overview
Represents a parser for Podspec files.
Instance Method Summary collapse
-
#initialize(path) ⇒ PodspecParser
constructor
Initializes a new instance of PodspecParser.
-
#parse ⇒ Podspec
Parses the Podspec file at the given path and returns a Podspec object.
Constructor Details
#initialize(path) ⇒ PodspecParser
Initializes a new instance of PodspecParser.
54 55 56 |
# File 'lib/flutter_rb/project/specs/ios/podspec.rb', line 54 def initialize(path) @path = path end |
Instance Method Details
#parse ⇒ Podspec
Parses the Podspec file at the given path and returns a Podspec object.
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/flutter_rb/project/specs/ios/podspec.rb', line 63 def parse # Parse the Podspec file using CocoaPods' Pod::Specification. podspec = Pod::Specification.from_file(@path) # Create a new Podspec object with the parsed data. @podspec = Podspec.new( @path, podspec.name, podspec.version.version, podspec..nil? ? podspec. : podspec., podspec.source ) end |