Class: HerokuFormationValidator::Runner
- Inherits:
-
Object
- Object
- HerokuFormationValidator::Runner
- Defined in:
- lib/heroku_formation_validator/runner.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Class Method Summary collapse
Instance Method Summary collapse
- #help_text ⇒ Object
-
#initialize(*args) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(*args) ⇒ Runner
Returns a new instance of Runner.
5 6 7 8 |
# File 'lib/heroku_formation_validator/runner.rb', line 5 def initialize(*args) @args = args run end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
3 4 5 |
# File 'lib/heroku_formation_validator/runner.rb', line 3 def args @args end |
Class Method Details
.execute(*args) ⇒ Object
10 11 12 |
# File 'lib/heroku_formation_validator/runner.rb', line 10 def self.execute(*args) new(*args).execute end |
Instance Method Details
#help_text ⇒ Object
23 24 25 26 27 |
# File 'lib/heroku_formation_validator/runner.rb', line 23 def help_text <<-help usage: heroku_formation_validator <config file name> help end |
#run ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/heroku_formation_validator/runner.rb', line 14 def run if filename = @args[0] exit HerokuFormationValidator.run(filename) ? 0 : 1 else puts help_text exit 1 end end |