Class: Churnalizer::CLI
- Inherits:
-
Object
- Object
- Churnalizer::CLI
- Defined in:
- lib/churnalizer/cli.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #analyze ⇒ Object
- #churnalizer ⇒ Object
- #help ⇒ Object
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
7 8 9 10 |
# File 'lib/churnalizer/cli.rb', line 7 def initialize @path = path analyze end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
5 6 7 |
# File 'lib/churnalizer/cli.rb', line 5 def path @path end |
Instance Method Details
#analyze ⇒ Object
12 13 14 15 |
# File 'lib/churnalizer/cli.rb', line 12 def analyze return help if path.nil? puts churnalizer.run end |
#churnalizer ⇒ Object
17 18 19 |
# File 'lib/churnalizer/cli.rb', line 17 def churnalizer @churnalizer ||= Churnalizer::Analyzer.new(path) end |
#help ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/churnalizer/cli.rb', line 21 def help puts """This is Churnalizer, a churn vs complexity analyzer for your Ruby application. Usage: churnalizer my-app/ """ end |