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