Class: Rosette::Core::Commands::GitCommand
- Defined in:
- lib/rosette/core/commands.rb
Overview
Base class for all of Rosette’s git-based commands.
Direct Known Subclasses
CommitCommand, DiffBaseCommand, EnqueueCommitCommand, ExportCommand, FetchCommand, RepoSnapshotCommand, RequeueCommitCommand, SnapshotCommand, StatusCommand, TranslationLookupCommand
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
-
#valid? ⇒ Boolean
Returns true if the command’s validators all pass, false otherwise.
Methods inherited from Command
#initialize, #messages, validate, validators
Constructor Details
This class inherits a constructor from Rosette::Core::Commands::Command
Instance Method Details
#valid? ⇒ Boolean
Returns true if the command’s validators all pass, false otherwise. After this method is finished executing, the messages hash will have been populated with error messages per field.
120 121 122 123 124 125 126 127 128 |
# File 'lib/rosette/core/commands.rb', line 120 def valid? self.class.validators.all? do |name, validators| validators.all? do |validator| valid = validator.valid?(send(name), repo_name, configuration) [name] = validator. unless valid valid end end end |