Class: Rails::Hyperdrive::AutoInstall::Result
- Inherits:
-
Struct
- Object
- Struct
- Rails::Hyperdrive::AutoInstall::Result
- Defined in:
- lib/rails/hyperdrive/auto_install.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#installed ⇒ Object
Returns the value of attribute installed.
-
#orphaned ⇒ Object
Returns the value of attribute orphaned.
-
#outdated ⇒ Object
Returns the value of attribute outdated.
-
#skipped ⇒ Object
Returns the value of attribute skipped.
-
#unwired ⇒ Object
Returns the value of attribute unwired.
Instance Method Summary collapse
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error
15 16 17 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 15 def error @error end |
#installed ⇒ Object
Returns the value of attribute installed
15 16 17 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 15 def installed @installed end |
#orphaned ⇒ Object
Returns the value of attribute orphaned
15 16 17 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 15 def orphaned @orphaned end |
#outdated ⇒ Object
Returns the value of attribute outdated
15 16 17 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 15 def outdated @outdated end |
#skipped ⇒ Object
Returns the value of attribute skipped
15 16 17 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 15 def skipped @skipped end |
#unwired ⇒ Object
Returns the value of attribute unwired
15 16 17 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 15 def unwired @unwired end |
Instance Method Details
#installed_anything? ⇒ Boolean
20 21 22 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 20 def installed_anything? !Array(installed).empty? end |
#messages ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 24 def return [] unless ran? lines = [] unless Array(installed).empty? lines << "installed #{installed.size} artifact(s):" installed.each { |path| lines << " #{path}" } end lines << "installed guideline(s) are not in context yet — run bin/rails hyperdrive:sync" if unwired stale = Array(outdated) + Array(orphaned) unless stale.empty? lines << "#{stale.size} artifact(s) need attention — run bin/rails hyperdrive:sync" stale.each { |entry| lines << " #{entry}" } end lines end |
#ran? ⇒ Boolean
16 17 18 |
# File 'lib/rails/hyperdrive/auto_install.rb', line 16 def ran? skipped.nil? end |