Class: ReactOnRails::AgentGuardrails::Installer
- Inherits:
-
Object
- Object
- ReactOnRails::AgentGuardrails::Installer
- Defined in:
- lib/react_on_rails/agent_guardrails.rb
Overview
Encapsulates a single install run against one app root.
Instance Method Summary collapse
-
#initialize(destination_root, skip_existing: false) ⇒ Installer
constructor
A new instance of Installer.
- #install ⇒ Object
Constructor Details
#initialize(destination_root, skip_existing: false) ⇒ Installer
Returns a new instance of Installer.
55 56 57 58 |
# File 'lib/react_on_rails/agent_guardrails.rb', line 55 def initialize(destination_root, skip_existing: false) @destination_root = File.(destination_root.to_s) @skip_existing = skip_existing end |
Instance Method Details
#install ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/react_on_rails/agent_guardrails.rb', line 60 def install validate_settings_before_copy actions = FILES.map { |source, dest_rel| copy_file(source, dest_rel) } actions << register_hook actions << remove_legacy_hook actions.compact end |