Class: Rampage
- Inherits:
-
Object
- Object
- Rampage
- Defined in:
- lib/rampage.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(script_to_run) ⇒ Rampage
constructor
A new instance of Rampage.
- #run ⇒ Object
Constructor Details
#initialize(script_to_run) ⇒ Rampage
Returns a new instance of Rampage.
7 8 9 |
# File 'lib/rampage.rb', line 7 def initialize(script_to_run) @path = script_to_run end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/rampage.rb', line 5 def path @path end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/rampage.rb', line 11 def run file = Tempfile.new ['rampage', '.html'] file.write `ruby #{path}` file.close Launchy.open file.path end |