class CC::Analyzer::IssueValidations::ContentValidation
Public Instance Methods
message()
click to toggle source
# File lib/cc/analyzer/issue_validations/content_validation.rb, line 9 def message "Content must be a hash containing a 'body' key with string contents" end
valid?()
click to toggle source
# File lib/cc/analyzer/issue_validations/content_validation.rb, line 5 def valid? !has_content? || (content.is_a?(Hash) && content["body"].is_a?(String)) end
Private Instance Methods
has_content?()
click to toggle source
# File lib/cc/analyzer/issue_validations/content_validation.rb, line 15 def has_content? object.key?("content") end