Module: ZendeskAppsSupport::Validations::Templates
- Defined in:
- lib/zendesk_apps_support/validations/templates.rb
Class Method Summary collapse
Class Method Details
.call(package) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/zendesk_apps_support/validations/templates.rb', line 6 def call(package) errors = [] package.template_files.each do |template| contents = template.read if contents =~ /<\s*style\b/ errors << ValidationError.new(:style_in_template, template: template.relative_path) end end errors end |