Class: FlutterRb::PluginPodspecCheck

Inherits:
Check
  • Object
show all
Defined in:
lib/flutter_rb/checks/plugin_podspec_check.rb

Overview

This class represents a check for Flutter plugin’s podspec file. It is an abstract class and should be subclassed to perform specific checks.

Constant Summary

Constants inherited from Check

Check::UNIMPLEMENTED_ERROR

Instance Method Summary collapse

Methods inherited from Check

#check

Instance Method Details

#descriptionString

Returns the description of the check. The description explains the purpose of the check, which is to validate a specific parameter in the Flutter plugin’s podspec file.

Returns:

  • (String)

    the description of the check



32
33
34
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 32

def description
  "Validate Flutter plugin's #{podspec_parameter} in podspec file"
end

#nameString

Returns the name of the check. The name is constructed by appending the capitalized podspec_parameter to “PluginPodspecCheck”.

Returns:

  • (String)

    the name of the check



14
15
16
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 14

def name
  "PluginPodspec#{podspec_parameter.capitalize}Check"
end

#podspec_parameterString

Returns the parameter for which the check is performed in the podspec file. This method should be implemented in subclasses to specify the specific parameter.

Returns:

  • (String)

    the parameter for which the check is performed

Raises:

  • (RuntimeError)

    if the method is not implemented in a subclass



23
24
25
# File 'lib/flutter_rb/checks/plugin_podspec_check.rb', line 23

def podspec_parameter
  raise UNIMPLEMENTED_ERROR
end