Class: Gitlab::Ci::Config::Entry::Workflow

Inherits:
Gitlab::Config::Entry::Node show all
Includes:
Gitlab::Config::Entry::Attributable, Gitlab::Config::Entry::Configurable, Gitlab::Config::Entry::Validatable
Defined in:
lib/gitlab/ci/config/entry/workflow.rb

Constant Summary collapse

ALLOWED_KEYS =
%i[rules name].freeze

Constants inherited from Gitlab::Config::Entry::Node

Gitlab::Config::Entry::Node::InvalidError

Instance Attribute Summary

Attributes inherited from Gitlab::Config::Entry::Node

#config, #default, #deprecation, #description, #key, #metadata, #parent

Instance Method Summary collapse

Methods included from Gitlab::Config::Entry::Validatable

#compose!, #errors, included, #validate, #validator

Methods included from Gitlab::Config::Entry::Configurable

#compose!, #entry_create!, #skip_config_hash_validation?

Methods inherited from Gitlab::Config::Entry::Node

#[], #add_warning, #ancestors, #array?, aspects, #compose!, default, #descendants, #errors, #hash?, #initialize, #inspect, #integer?, #leaf?, #location, #opt, #relevant?, #specified?, #string?, #valid?, #value, #warnings, with_aspect

Constructor Details

This class inherits a constructor from Gitlab::Config::Entry::Node

Instance Method Details

#has_rules?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/gitlab/ci/config/entry/workflow.rb', line 26

def has_rules?
  @config.try(:key?, :rules)
end