Class: Pod::Command::HMapReader
- Inherits:
-
Pod::Command
- Object
- Pod::Command
- Pod::Command::HMapReader
- Defined in:
- lib/cocoapods-hmap-prebuilt/command/hmap_reader.rb
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.
13 14 15 16 17 |
# File 'lib/cocoapods-hmap-prebuilt/command/hmap_reader.rb', line 13 def initialize(argv) super hmap_file_path = argv.option('hmap-path') @hmap_file_path = Pathname.new(hmap_file_path). unless hmap_file_path.nil? end |
Class Method Details
.options ⇒ Object
25 26 27 28 29 |
# File 'lib/cocoapods-hmap-prebuilt/command/hmap_reader.rb', line 25 def self. [ ['--hmap-path=/hmap/dir/file', 'The path of the hmap file'] ].concat(super) end |
Instance Method Details
#run ⇒ Object
31 32 33 34 35 36 |
# File 'lib/cocoapods-hmap-prebuilt/command/hmap_reader.rb', line 31 def run UI.section "\n[hmap-reader] start..............\n".yellow do HMap::MapFileReader.new(@hmap_file_path) end UI.puts("\n[hmap-reader] finish..............\n".yellow) end |
#validate! ⇒ Object
19 20 21 22 23 |
# File 'lib/cocoapods-hmap-prebuilt/command/hmap_reader.rb', line 19 def validate! super if help? raise '[ERROR]: --hmap-path no set'.red unless File.exist?(@hmap_file_path) end |