Class: InitHera

Inherits:
Object
  • Object
show all
Defined in:
lib/hera/init_hera.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {:site_type => ''}) ⇒ InitHera

Returns a new instance of InitHera.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/hera/init_hera.rb', line 7

def initialize (options = {:site_type => ''})

  $site_type = options[:site_type]

  if ($site_type == "site" || $site_type == nil)
    clone_base_site
  end

  if ($site_type == "app")
    clone_app_site
  end

  if ($site_type == "product")
    clone_product_site
  end
end

Instance Method Details

#check_for_configObject



38
39
40
# File 'lib/hera/init_hera.rb', line 38

def check_for_config
  system "hera"
end

#clone_app_siteObject



30
31
32
# File 'lib/hera/init_hera.rb', line 30

def clone_app_site
  puts "Application site theme coming soon."
end

#clone_base_siteObject



24
25
26
27
28
# File 'lib/hera/init_hera.rb', line 24

def clone_base_site
  puts "Hera will now install: Base site, by HydraulicLabs."
  system "gh clone connatser/hera_site ."
  check_for_config
end

#clone_product_siteObject



34
35
36
# File 'lib/hera/init_hera.rb', line 34

def clone_product_site
  puts "Product site theme coming soon."
end