Class: RugularES6
- Inherits:
-
Object
- Object
- RugularES6
- Defined in:
- lib/rugular/tasks/server/guards/rugular_es6.rb
Class Method Summary collapse
Instance Method Summary collapse
- #compile ⇒ Object
- #delete ⇒ Object
-
#initialize(es6_file) ⇒ RugularES6
constructor
A new instance of RugularES6.
Constructor Details
#initialize(es6_file) ⇒ RugularES6
Returns a new instance of RugularES6.
12 13 14 |
# File 'lib/rugular/tasks/server/guards/rugular_es6.rb', line 12 def initialize(es6_file) @es6_file = es6_file end |
Class Method Details
.compile(es6_file) ⇒ Object
4 5 6 |
# File 'lib/rugular/tasks/server/guards/rugular_es6.rb', line 4 def self.compile(es6_file) new(es6_file).compile end |
.delete(es6_file) ⇒ Object
8 9 10 |
# File 'lib/rugular/tasks/server/guards/rugular_es6.rb', line 8 def self.delete(es6_file) new(es6_file).delete end |
Instance Method Details
#compile ⇒ Object
16 17 18 19 20 |
# File 'lib/rugular/tasks/server/guards/rugular_es6.rb', line 16 def compile write_tmp_file "Successfully compiled #{es6_file} to js!\n" end |
#delete ⇒ Object
22 23 24 25 26 |
# File 'lib/rugular/tasks/server/guards/rugular_es6.rb', line 22 def delete FileUtils.rm(tmp_file) "Sucessfully removed #{tmp_file}\n" end |