Class: FlutterRb::IOSFolder

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

Overview

Represents the iOS folder structure and its associated podspec file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, pubspec) ⇒ IOSFolder

Initializes a new instance of IOSFolder.

Parameters:

  • path (String)

    The path to the iOS folder.

  • pubspec (Pubspec)

    The parsed pubspec information.



14
15
16
17
18
19
20
# File 'lib/flutter_rb/project/specs/ios/ios_folder.rb', line 14

def initialize(path, pubspec)
  @path = path
  # Construct the path to the podspec file.
  podspec_path = "#{path}/#{pubspec.pubspec_info.name}.podspec"
  # If the podspec file exists, parse it; otherwise, set @podspec to nil.
  @podspec = File.exist?(podspec_path) ? PodspecParser.new(podspec_path).parse : nil
end

Instance Attribute Details

#pathString (readonly)

Returns the path to the iOS folder.

Returns:

  • (String)

    The path to the iOS folder.



25
26
27
# File 'lib/flutter_rb/project/specs/ios/ios_folder.rb', line 25

def path
  @path
end

#podspecPodspec? (readonly)

Returns the parsed podspec information.

Returns:

  • (Podspec, nil)

    The parsed podspec information, or nil if the podspec file does not exist.



30
31
32
# File 'lib/flutter_rb/project/specs/ios/ios_folder.rb', line 30

def podspec
  @podspec
end