Class: Maglev::Hyperui::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/maglev/hyperui/install/install_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#theme_nameObject (readonly)

Returns the value of attribute theme_name.



8
9
10
# File 'lib/generators/maglev/hyperui/install/install_generator.rb', line 8

def theme_name
  @theme_name
end

Instance Method Details

#copy_pro_theme_and_sectionsObject



20
21
22
23
24
25
# File 'lib/generators/maglev/hyperui/install/install_generator.rb', line 20

def copy_pro_theme_and_sections
  return if theme_name.blank?
  rake('maglev_pro:hyperui_kit:create_pro_version')
  directory 'app_pro', 'app'
  directory 'public_pro', 'public'
end

#copy_theme_and_sectionsObject



14
15
16
17
18
# File 'lib/generators/maglev/hyperui/install/install_generator.rb', line 14

def copy_theme_and_sections
  return if theme_name.present?
  directory 'app'
  directory 'public'
end

#set_theme_nameObject



10
11
12
# File 'lib/generators/maglev/hyperui/install/install_generator.rb', line 10

def set_theme_name
  @theme_name = options['theme']
end