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



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

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



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

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



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

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

#unihan(version = nil) ⇒ Object



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

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