Class: Ucode::Cli::Fetch

Inherits:
Thor
  • Object
show all
Defined in:
lib/ucode/cli.rb

Overview

─────────────── fetch ───────────────

Instance Method Summary collapse

Instance Method Details

#charts(version = nil) ⇒ Object



55
56
57
58
59
60
# File 'lib/ucode/cli.rb', line 55

def charts(version = nil)
  cps = options[:block]&.map { |id| block_id_to_first_cp(id) }&.compact
  puts format_result Commands::FetchCommand.new
    .fetch_charts(VersionResolver.resolve(version),
                  block_first_cps: cps, force: options[:force])
end

#fontsObject



70
71
72
73
74
75
76
77
78
# File 'lib/ucode/cli.rb', line 70

def fonts
  result = Commands::FetchCommand.new.fetch_fonts(
    manifest_path: options[:manifest],
    only_label: options[:label],
    allow_proprietary: options[:allow_proprietary],
    dry_run: options[:dry_run],
  )
  puts format_fonts_result(result)
end

#ucd(version = nil) ⇒ Object



38
39
40
41
42
# File 'lib/ucode/cli.rb', line 38

def ucd(version = nil)
  puts format_result Commands::FetchCommand.new.fetch_ucd(
    VersionResolver.resolve(version), force: options[:force],
  )
end

#unihan(version = nil) ⇒ Object



46
47
48
49
50
# File 'lib/ucode/cli.rb', line 46

def unihan(version = nil)
  puts format_result Commands::FetchCommand.new.fetch_unihan(
    VersionResolver.resolve(version), force: options[:force],
  )
end