Class: Kamal::Configuration::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/kamal/configuration/validator.rb

Direct Known Subclasses

Accessory, Alias, Builder, Configuration, Env, Proxy, Registry, Role, Servers

Defined Under Namespace

Classes: Accessory, Alias, Builder, Configuration, Env, Proxy, Registry, Role, Servers

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, example:, context:) ⇒ Validator

Returns a new instance of Validator.



4
5
6
7
8
# File 'lib/kamal/configuration/validator.rb', line 4

def initialize(config, example:, context:)
  @config = config
  @example = example
  @context = context
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



2
3
4
# File 'lib/kamal/configuration/validator.rb', line 2

def config
  @config
end

#contextObject (readonly)

Returns the value of attribute context.



2
3
4
# File 'lib/kamal/configuration/validator.rb', line 2

def context
  @context
end

#exampleObject (readonly)

Returns the value of attribute example.



2
3
4
# File 'lib/kamal/configuration/validator.rb', line 2

def example
  @example
end

Instance Method Details

#validate!Object



10
11
12
# File 'lib/kamal/configuration/validator.rb', line 10

def validate!
  validate_against_example! config, example
end