Class: Djin::MainConfig

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/djin/entities/main_config.rb

Instance Method Summary collapse

Instance Method Details

#deep_merge(file_config) ⇒ Object



26
27
28
29
30
# File 'lib/djin/entities/main_config.rb', line 26

def deep_merge(file_config)
  merged_hash = to_h.deep_merge(file_config.to_h)

  MainConfig.new(merged_hash)
end

#merge(file_config) ⇒ Object



20
21
22
23
24
# File 'lib/djin/entities/main_config.rb', line 20

def merge(file_config)
  merged_hash = to_h.merge(file_config.to_h)

  MainConfig.new(merged_hash)
end

#version_supported?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/djin/entities/main_config.rb', line 16

def version_supported?
  Vseries::SemanticVersion.new(Djin::VERSION) >= Vseries::SemanticVersion.new(djin_version)
end