Class: Rails::Hyperdrive::InstallLayout::Kind
- Inherits:
-
Struct
- Object
- Struct
- Rails::Hyperdrive::InstallLayout::Kind
- Defined in:
- lib/rails/hyperdrive/install_layout.rb
Overview
One kind's whole contract: how a companion ships it, how it is identified and validated, and where each target tool installs it.
Instance Attribute Summary collapse
-
#collision_rewrites_name ⇒ Object
Returns the value of attribute collision_rewrites_name.
-
#convention_roots ⇒ Object
Returns the value of attribute convention_roots.
-
#dests ⇒ Object
Returns the value of attribute dests.
-
#dir_key ⇒ Object
Returns the value of attribute dir_key.
-
#eager ⇒ Object
Returns the value of attribute eager.
-
#erb ⇒ Object
Returns the value of attribute erb.
-
#frontmatter ⇒ Object
Returns the value of attribute frontmatter.
-
#identity ⇒ Object
Returns the value of attribute identity.
-
#install_body ⇒ Object
Returns the value of attribute install_body.
-
#key_label ⇒ Object
Returns the value of attribute key_label.
-
#name_from_dest ⇒ Object
Returns the value of attribute name_from_dest.
-
#prefix_key ⇒ Object
Returns the value of attribute prefix_key.
-
#section ⇒ Object
Returns the value of attribute section.
-
#shape ⇒ Object
Returns the value of attribute shape.
-
#shipped_label ⇒ Object
Returns the value of attribute shipped_label.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #dest_for(final_name, target: DEFAULT_TARGET) ⇒ Object
-
#dir_shaped? ⇒ Boolean
Only a directory-shaped kind ships supporting files, so it is the only one a manifest entry may gate per file.
- #installed_name(dest) ⇒ Object
- #lock_kind ⇒ Object
-
#roots_for(gem_name) ⇒ Object
Relative to the gem root; searched in the order given.
Instance Attribute Details
#collision_rewrites_name ⇒ Object
Returns the value of attribute collision_rewrites_name
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def collision_rewrites_name @collision_rewrites_name end |
#convention_roots ⇒ Object
Returns the value of attribute convention_roots
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def convention_roots @convention_roots end |
#dests ⇒ Object
Returns the value of attribute dests
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def dests @dests end |
#dir_key ⇒ Object
Returns the value of attribute dir_key
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def dir_key @dir_key end |
#eager ⇒ Object
Returns the value of attribute eager
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def eager @eager end |
#erb ⇒ Object
Returns the value of attribute erb
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def erb @erb end |
#frontmatter ⇒ Object
Returns the value of attribute frontmatter
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def frontmatter @frontmatter end |
#identity ⇒ Object
Returns the value of attribute identity
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def identity @identity end |
#install_body ⇒ Object
Returns the value of attribute install_body
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def install_body @install_body end |
#key_label ⇒ Object
Returns the value of attribute key_label
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def key_label @key_label end |
#name_from_dest ⇒ Object
Returns the value of attribute name_from_dest
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def name_from_dest @name_from_dest end |
#prefix_key ⇒ Object
Returns the value of attribute prefix_key
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def prefix_key @prefix_key end |
#section ⇒ Object
Returns the value of attribute section
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def section @section end |
#shape ⇒ Object
Returns the value of attribute shape
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def shape @shape end |
#shipped_label ⇒ Object
Returns the value of attribute shipped_label
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def shipped_label @shipped_label end |
#type ⇒ Object
Returns the value of attribute type
23 24 25 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 23 def type @type end |
Instance Method Details
#dest_for(final_name, target: DEFAULT_TARGET) ⇒ Object
39 40 41 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 39 def dest_for(final_name, target: DEFAULT_TARGET) dests[target]&.path&.call(final_name) end |
#dir_shaped? ⇒ Boolean
Only a directory-shaped kind ships supporting files, so it is the only one a manifest entry may gate per file.
35 36 37 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 35 def dir_shaped? shape == :dir end |
#installed_name(dest) ⇒ Object
43 44 45 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 43 def installed_name(dest) name_from_dest.call(dest) end |
#lock_kind ⇒ Object
29 30 31 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 29 def lock_kind type.to_s end |
#roots_for(gem_name) ⇒ Object
Relative to the gem root; searched in the order given.
48 49 50 |
# File 'lib/rails/hyperdrive/install_layout.rb', line 48 def roots_for(gem_name) convention_roots ? convention_roots.call(gem_name) : [] end |