class Pod::Command::HMapReader

hmap file reader cmd

Public Class Methods

new(argv) click to toggle source
Calls superclass method
# 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).expand_path unless mapfile_path.nil?
end
options() click to toggle source
Calls superclass method
# File lib/cocoapods-hmap/command/hmap_reader.rb, line 28
def self.options
  [
    ['--hmap-path=/hmap/dir/file', 'The path of the hmap file']
  ].concat(super)
end

Public Instance Methods

run() click to toggle source
# 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!() click to toggle source
Calls superclass method
# File lib/cocoapods-hmap/command/hmap_reader.rb, line 22
def validate!
  super
  banner! if help?
  raise '[ERROR]: --hmap-path no set'.red unless File.exist?(@mapfile_path)
end