Class: FlutterRb::PluginDirectoriesCheck
- Defined in:
- lib/flutter_rb/checks/plugin_directories_check.rb
Overview
This class represents a check for plugin directories structure in a Flutter project.
Constant Summary
Constants inherited from Check
Instance Method Summary collapse
-
#check(project) ⇒ CheckReport
Performs the check on the given project.
-
#description ⇒ String
Returns a description of the check.
-
#name ⇒ String
Returns the name of the check.
Instance Method Details
#check(project) ⇒ CheckReport
Performs the check on the given project.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/flutter_rb/checks/plugin_directories_check.rb', line 27 def check(project) # Check if android and ios folders exist. android_exists = !project.android_folder.nil? ios_exists = !project.ios_folder.nil? # Determine the check result based on the existence of android and ios folders. check_result = android_exists && ios_exists || !android_exists && !ios_exists # Create a new CheckReport with the result. CheckReport.new( name, check_result ? CheckReportStatus::NORMAL : CheckReportStatus::ERROR, description, project.path ) end |
#description ⇒ String
Returns a description of the check.
19 20 21 |
# File 'lib/flutter_rb/checks/plugin_directories_check.rb', line 19 def description 'Check plugin directories structure in pubspec file' end |
#name ⇒ String
Returns the name of the check.
12 13 14 |
# File 'lib/flutter_rb/checks/plugin_directories_check.rb', line 12 def name 'PluginDirectoriesCheck' end |