Class: PrometheusApp::App

Inherits:
Prometheus::Base show all
Includes:
Thor::Actions
Defined in:
lib/prometheus/plugins/app/app_commands.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Prometheus::Base

banner, #help, #repl, repl_banner

Methods included from Prometheus::PluginDSL

#configurable, #full_name, #readme, #start

Instance Attribute Details

#author_emailObject

Returns the value of attribute author_email.



4
5
6
# File 'lib/prometheus/plugins/app/app_commands.rb', line 4

def author_email
  @author_email
end

#author_nameObject

Returns the value of attribute author_name.



4
5
6
# File 'lib/prometheus/plugins/app/app_commands.rb', line 4

def author_name
  @author_name
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/prometheus/plugins/app/app_commands.rb', line 4

def name
  @name
end

Class Method Details

.source_rootObject



8
# File 'lib/prometheus/plugins/app/app_commands.rb', line 8

def self.source_root; TEMPLATES_PATH; end

Instance Method Details

#new(name) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/prometheus/plugins/app/app_commands.rb', line 12

def new(name)
  @name = name
  @author_name = `git config --global --get user.name`.strip
  @author_email = `git config --global --get user.email`.strip
  directory 'app', @name
  chmod "#{@name}/bin/#{@name}", '+x'
end