Class: Gemaker::Cmd::Base

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/gemaker/commands/base.rb

Instance Method Summary collapse

Methods included from Util

#copy_file, #copy_template, #create_dir, #error, #execute, #execute_in_gem, #gem_root_path, #get_destination_path, #get_template_path, #info, #parse_erb, #remove_in_gem, #utils_path

Instance Method Details

#in_engine_contextObject



15
16
17
# File 'lib/gemaker/commands/base.rb', line 15

def in_engine_context
  # Override on child classes
end

#in_normal_contextObject



19
20
21
# File 'lib/gemaker/commands/base.rb', line 19

def in_normal_context
  # Override on child classes
end

#performObject



6
7
8
9
10
11
12
13
# File 'lib/gemaker/commands/base.rb', line 6

def perform
  if @config.engine?
    in_engine_context
    return
  end

  in_normal_context
end