Class: Nrb::Commands::InsideGroup
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Nrb::Commands::InsideGroup
show all
- Includes:
- Thor::Actions
- Defined in:
- lib/nrb/commands/inside_group.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.desc_with_warning(description) ⇒ Object
10
11
12
|
# File 'lib/nrb/commands/inside_group.rb', line 10
def self.desc_with_warning(description)
self.desc [description, warning].compact.join('. ')
end
|
.source_root ⇒ Object
14
15
16
|
# File 'lib/nrb/commands/inside_group.rb', line 14
def self.source_root
File.expand_path('..', __dir__)
end
|
.warning ⇒ Object
6
7
8
|
# File 'lib/nrb/commands/inside_group.rb', line 6
def self.warning
'NOTE: Available inside a NinjaRuby project' unless Nrb.inside?
end
|
Instance Method Details
#check_inside? ⇒ Boolean
18
19
20
21
22
23
|
# File 'lib/nrb/commands/inside_group.rb', line 18
def check_inside?
return if Nrb.inside?
klass_name = self.class.to_s.split('::').last
say "You need to be inside a NinjaRuby folder to run the #{klass_name} command."
exit
end
|