class CC::Config::Engine

Constants

DEFAULT_CHANNEL

Attributes

channel[RW]
config[R]
enabled[W]
exclude_patterns[R]
name[R]

Public Class Methods

new(name, enabled: false, channel: nil, config: nil, exclude_patterns: []) click to toggle source
# File lib/cc/config/engine.rb, line 10
def initialize(name, enabled: false, channel: nil, config: nil, exclude_patterns: [])
  @name = name
  @enabled = enabled
  @channel = channel || DEFAULT_CHANNEL
  @config = config || {}
  @exclude_patterns = exclude_patterns
end

Public Instance Methods

==(other)
Alias for: eql?
container_label() click to toggle source
# File lib/cc/config/engine.rb, line 26
def container_label
  @container_label ||= SecureRandom.uuid
end
enabled?() click to toggle source
# File lib/cc/config/engine.rb, line 18
def enabled?
  @enabled
end
eql?(other) click to toggle source
# File lib/cc/config/engine.rb, line 34
def eql?(other)
  other.is_a?(self.class) && name.eql?(other.name)
end
Also aliased as: ==, equal?
equal?(other)
Alias for: eql?
hash() click to toggle source
# File lib/cc/config/engine.rb, line 30
def hash
  name.hash
end
plugin?() click to toggle source
# File lib/cc/config/engine.rb, line 22
def plugin?
  !DefaultAdapter::ENGINES.keys.include?(name)
end