Class: Gambiarra::UI::BaseView
- Inherits:
-
View
- Object
- View
- Gambiarra::UI::BaseView
show all
- Defined in:
- lib/gambiarra/ui/base_view.rb
Instance Attribute Summary
Attributes inherited from View
#params, #path
Instance Method Summary
collapse
Methods inherited from View
#ensure_param, #go_to, inherited, #initialize, #output, questions, render, respond, set_path
Instance Method Details
#project_constant ⇒ Object
18
19
20
|
# File 'lib/gambiarra/ui/base_view.rb', line 18
def project_constant
project_name.gsub('-', '_').camelize
end
|
#project_name ⇒ Object
14
15
16
|
# File 'lib/gambiarra/ui/base_view.rb', line 14
def project_name
Dir.pwd.split('/').last
end
|
#thor ⇒ Object
4
5
6
7
8
9
10
11
12
|
# File 'lib/gambiarra/ui/base_view.rb', line 4
def thor
@thor ||= begin
thor_class = Class.new(Thor::Group) do
include Thor::Actions
end
.tap { |t| t.source_root("#{Dir.pwd}") }
.new
end
end
|