Class: Pod::Command::HMapGen
- Inherits:
-
Pod::Command
- Object
- Pod::Command
- Pod::Command::HMapGen
- Defined in:
- lib/cocoapods-hmap/command/hmap_gen.rb
Overview
hmap file gen cmd
Class Method Summary collapse
-
.options ⇒ Object
help.
Instance Method Summary collapse
-
#initialize(argv) ⇒ HMapGen
constructor
A new instance of HMapGen.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ HMapGen
Returns a new instance of HMapGen.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cocoapods-hmap/command/hmap_gen.rb', line 17 def initialize(argv) super project_directory = argv.option('project-directory') @save_origin_header_search_paths = !argv.flag?('nosave-origin-header-search-paths', false) @clean_hmap = argv.flag?('clean-hmap', false) return if project_directory.nil? @project_directory = Pathname.new(project_directory). config.installation_root = @project_directory end |
Class Method Details
.options ⇒ Object
help
35 36 37 38 39 40 41 42 |
# File 'lib/cocoapods-hmap/command/hmap_gen.rb', line 35 def self. [ ['--project-directory=/project/dir/', 'The path to the root of the project directory'], ['--nosave-origin-header-search-paths', 'This option will not save xcconfig origin [HEADER_SEARCH_PATHS] and put hmap file first'], ['--clean-hmap', 'This option will clean up all hmap-gen setup for hmap.'] ].concat(super) end |
Instance Method Details
#run ⇒ Object
44 45 46 47 48 49 |
# File 'lib/cocoapods-hmap/command/hmap_gen.rb', line 44 def run UI.section "\n[hmap-gen] start.............." do HMap::MapFileWriter.new(@save_origin_header_search_paths, @clean_hmap) end UI.puts('[hmap-gen] finish..............') end |
#validate! ⇒ Object
29 30 31 32 |
# File 'lib/cocoapods-hmap/command/hmap_gen.rb', line 29 def validate! super verify_podfile_exists! end |