Class: BooticCli::Themes::APIAsset

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

Instance Method Summary collapse

Methods inherited from ItemWithTime

#updated_on

Instance Method Details

#==(other) ⇒ Object



22
23
24
25
26
27
28
29
30
31
# File 'lib/bootic_cli/themes/api_theme.rb', line 22

def ==(other)
  if digest.to_s == '' || other.digest.to_s == ''
    # puts "One or the other digest is empty: #{digest} -- #{other.digest}"
    return super
  end

  # file sizes may differ as they are served by CDN (that shrinks them)
  # puts "Comparing APIAsset vs other digest:\n#{digest}\n#{other.digest}"
  self.digest == other.digest # && self.file_size == other.file_size
end

#fileObject



18
19
20
# File 'lib/bootic_cli/themes/api_theme.rb', line 18

def file
  @file ||= BooticCli::Utils.fetch_http_file(rels[:file].href)
end