Class: BooticCli::Themes::ThemeDiff

Inherits:
Object
  • Object
show all
Defined in:
lib/bootic_cli/themes/theme_diff.rb

Instance Method Summary collapse

Constructor Details

#initialize(source:, target:, force_update: false) ⇒ ThemeDiff

Returns a new instance of ThemeDiff.



7
8
9
10
# File 'lib/bootic_cli/themes/theme_diff.rb', line 7

def initialize(source:, target:, force_update: false)
  @source, @target = source, target
  @force_update = force_update
end

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/bootic_cli/themes/theme_diff.rb', line 12

def any?
  updated_in_source.any? || updated_in_target.any? || missing_in_target.any? || missing_in_source.any?
end

#missing_in_sourceObject



28
29
30
# File 'lib/bootic_cli/themes/theme_diff.rb', line 28

def missing_in_source
  @missing_in_source ||= MissingItemsTheme.new(source: target, target: source)
end

#missing_in_targetObject



24
25
26
# File 'lib/bootic_cli/themes/theme_diff.rb', line 24

def missing_in_target
  @missing_in_target ||= MissingItemsTheme.new(source: source, target: target)
end

#updated_in_sourceObject



16
17
18
# File 'lib/bootic_cli/themes/theme_diff.rb', line 16

def updated_in_source
  @updated_in_source ||= UpdatedTheme.new(source: source, target: target, force_update: force_update)
end

#updated_in_targetObject



20
21
22
# File 'lib/bootic_cli/themes/theme_diff.rb', line 20

def updated_in_target
  @updated_in_target ||= UpdatedTheme.new(source: target, target: source, force_update: force_update)
end