Class: Rails::Generators::Hyperdrive::ContentSyncSupport::ThorShell
- Inherits:
-
Object
- Object
- Rails::Generators::Hyperdrive::ContentSyncSupport::ThorShell
- Defined in:
- lib/generators/hyperdrive/content_sync_support.rb
Overview
Routes InstallPipeline's writes through Thor, so its output and
--dry-run handling cover installed content too.
Instance Method Summary collapse
- #append_to_file(path, content) ⇒ Object
- #create_file(path, content) ⇒ Object
-
#initialize(generator) ⇒ ThorShell
constructor
A new instance of ThorShell.
- #remove_file(path) ⇒ Object
- #say(message = "") ⇒ Object
- #say_status(kind, message, color = nil) ⇒ Object
Constructor Details
#initialize(generator) ⇒ ThorShell
Returns a new instance of ThorShell.
13 14 15 |
# File 'lib/generators/hyperdrive/content_sync_support.rb', line 13 def initialize(generator) @generator = generator end |
Instance Method Details
#append_to_file(path, content) ⇒ Object
21 22 23 |
# File 'lib/generators/hyperdrive/content_sync_support.rb', line 21 def append_to_file(path, content) @generator.append_to_file(path, content) end |
#create_file(path, content) ⇒ Object
17 18 19 |
# File 'lib/generators/hyperdrive/content_sync_support.rb', line 17 def create_file(path, content) @generator.create_file(path, content, force: true) end |
#remove_file(path) ⇒ Object
25 26 27 |
# File 'lib/generators/hyperdrive/content_sync_support.rb', line 25 def remove_file(path) @generator.remove_file(path) end |
#say(message = "") ⇒ Object
33 34 35 |
# File 'lib/generators/hyperdrive/content_sync_support.rb', line 33 def say( = "") @generator.say() end |
#say_status(kind, message, color = nil) ⇒ Object
29 30 31 |
# File 'lib/generators/hyperdrive/content_sync_support.rb', line 29 def say_status(kind, , color = nil) @generator.say_status(kind, , color) end |