class MetaBuild::CommandLine

Public Class Methods

execute(options = {}) click to toggle source
# File lib/meta_build/command_line.rb, line 4
def self.execute(options = {})
  new(options).run
end
new(options = {}) click to toggle source
# File lib/meta_build/command_line.rb, line 8
def initialize(options = {})
  message = MetaBuild::Helper::AppHelper.validate_options options
  if message
    puts "[ERROR] #{message}"
    exit 1
  end

  @options = options

  @options[:name] = MetaBuild::Helper::AppHelper.set_target_name(@options[:name], @options[:compressed_file])
  @options[:replace_files] ||= false
  @options[:create_dir] ||= false
end

Public Instance Methods

run() click to toggle source
# File lib/meta_build/command_line.rb, line 22
def run
  MetaBuild::App.new(@options).extract_metadata
end