Class: Tapioca::Cli

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/tapioca/cli.rb

Instance Method Summary collapse

Instance Method Details

#generate(*gems) ⇒ Object



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

def generate(*gems)
  Tapioca.silence_warnings do
    generator.build_gem_rbis(gems)
  end
end

#initObject



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/tapioca/cli.rb', line 36

def init
  create_file(Generator::SORBET_CONFIG, skip: true) do
    <<~CONTENT
      --dir
      .
    CONTENT
  end
  create_file(Generator::DEFAULT_POSTREQUIRE, skip: true) do
    <<~CONTENT
      # frozen_string_literal: true
      # typed: false

      # Add your extra requires here
    CONTENT
  end
end

#syncObject



61
62
63
64
65
# File 'lib/tapioca/cli.rb', line 61

def sync
  Tapioca.silence_warnings do
    generator.sync_rbis_with_gemfile
  end
end