Class: Pod::Command::HMapReader
- Inherits:
-
Pod::Command
- Object
- Pod::Command
- Pod::Command::HMapReader
- Defined in:
- lib/cocoapods-hmap/command/hmap_reader.rb
Overview
hmap file reader cmd
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ HMapReader
constructor
A new instance of HMapReader.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ HMapReader
Returns a new instance of HMapReader.
16 17 18 19 20 |
# File 'lib/cocoapods-hmap/command/hmap_reader.rb', line 16 def initialize(argv) super mapfile_path = argv.option('hmap-path') @mapfile_path = Pathname.new(mapfile_path). unless mapfile_path.nil? end |
Class Method Details
.options ⇒ Object
28 29 30 31 32 |
# File 'lib/cocoapods-hmap/command/hmap_reader.rb', line 28 def self. [ ['--hmap-path=/hmap/dir/file', 'The path of the hmap file'] ].concat(super) end |
Instance Method Details
#run ⇒ Object
34 35 36 37 38 39 |
# File 'lib/cocoapods-hmap/command/hmap_reader.rb', line 34 def run UI.section "\n[hmap-reader] start..............\n".yellow do HMap::MapFileReader.new(@mapfile_path) end UI.puts("\n[hmap-reader] finish..............\n".yellow) end |
#validate! ⇒ Object
22 23 24 25 26 |
# File 'lib/cocoapods-hmap/command/hmap_reader.rb', line 22 def validate! super if help? raise '[ERROR]: --hmap-path no set'.red unless File.exist?(@mapfile_path) end |