Class: BlobViewer::GitlabCiYml
- Includes:
- Auxiliary, ServerSide
- Defined in:
- app/models/blob_viewer/gitlab_ci_yml.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Auxiliary
Methods included from Gitlab::Allowable
Methods included from ServerSide
Methods inherited from Base
auxiliary?, binary?, #binary_detected_after_load?, can_render?, #collapsed?, #initialize, load_async?, loading_partial_path, partial_path, #prepare!, #render_error, rich?, simple?, text?, #too_large?
Constructor Details
This class inherits a constructor from BlobViewer::Base
Instance Method Details
#valid?(opts) ⇒ Boolean
23 24 25 |
# File 'app/models/blob_viewer/gitlab_ci_yml.rb', line 23 def valid?(opts) (opts).blank? end |
#validation_message(opts) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/models/blob_viewer/gitlab_ci_yml.rb', line 13 def (opts) return @validation_message if defined?(@validation_message) prepare! @validation_message = Gitlab::Ci::Lint .new(project: opts[:project], current_user: opts[:user], sha: opts[:sha]) .validate(blob.data).errors.first end |