Class: Travis::Yaml::Nodes::Notifications::Template

Inherits:
Sequence show all
Defined in:
lib/travis/yaml/nodes/notifications.rb

Constant Summary collapse

VARIABLES =
%w[repository_slug repository_name repository build_number branch commit author message duration compare_url build_url commit_message]

Instance Attribute Summary

Attributes inherited from Sequence

#children

Attributes inherited from Travis::Yaml::Nodes::Node

#parent

Instance Method Summary collapse

Methods inherited from Sequence

#==, [], #add_value, #add_value!, #deep_verify, #each_scalar, #empty?, #identifier, #inspect, #nested_warnings, #prepare, #to_s, type, #verify_children, #visit_child, #visit_mapping, #visit_scalar, #visit_sequence, #with_value, #with_value!

Methods inherited from Travis::Yaml::Nodes::Node

#decrypt, #decrypted?, #deep_verify, #dup, #encrypt, #encrypted?, #error, #errors, #errors?, has_default?, #initialize, #method_missing, #nested_warning, #nested_warnings, #prepare, #respond_to_missing?, #serialize, #to_json, #to_legacy_ruby, #to_ruby, #to_s, #to_yaml, #verify_language, #visit_child, #visit_mapping, #visit_pair, #visit_scalar, #visit_sequence, #visit_unexpected, #warngings?, #warning, #warnings, #with_value

Constructor Details

This class inherits a constructor from Travis::Yaml::Nodes::Node

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Travis::Yaml::Nodes::Node

Instance Method Details

#verifyObject



41
42
43
44
45
46
47
48
49
# File 'lib/travis/yaml/nodes/notifications.rb', line 41

def verify
  super
  @children.each do |child|
    child.to_s.scan(/%{([^}]+)}/) do |match|
      next if VARIABLES.include? match.first
      warning 'unknown "template" variable %p', match.first
    end
  end
end