Class: FlutterRb::PluginPodspecNameCheck
- Inherits:
-
PluginPodspecCheck
- Object
- Check
- PluginPodspecCheck
- FlutterRb::PluginPodspecNameCheck
- Defined in:
- lib/flutter_rb/checks/plugin_podspec_check.rb
Overview
This class represents a check for Flutter plugin’s name in the podspec file. It is a subclass of PluginPodspecCheck and overrides the necessary methods to perform the specific check.
Constant Summary
Constants inherited from Check
Instance Method Summary collapse
-
#check(project) ⇒ CheckReport
Performs the check for the plugin’s name in the podspec file.
-
#podspec_parameter ⇒ String
Returns the parameter for which the check is performed in the podspec file.
Methods inherited from PluginPodspecCheck
Methods inherited from Check
Instance Method Details
#check(project) ⇒ CheckReport
Performs the check for the plugin’s name in the podspec file. It compares the name in the pubspec file with the name in the podspec file. If they match, it returns a CheckReport with a normal status. If they do not match, it returns a CheckReport with a warning status.
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 55 def check(project) name_in_pubspec = project.pubspec.pubspec_info.name podspec = project.ios_folder.podspec name_in_podspec = podspec.name CheckReport.new( name, name_in_pubspec == name_in_podspec ? ::CheckReportStatus::NORMAL : ::CheckReportStatus::WARNING, description, podspec.path ) end |
#podspec_parameter ⇒ String
Returns the parameter for which the check is performed in the podspec file. In this case, it returns ‘name’.
44 45 46 |
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 44 def podspec_parameter 'name' end |