Class: TerraspaceBundler::Mod::Props::Typer
- Inherits:
-
Object
- Object
- TerraspaceBundler::Mod::Props::Typer
- Includes:
- Concerns::LocalConcern, Concerns::NotationConcern
- Defined in:
- lib/terraspace_bundler/mod/props/typer.rb
Instance Attribute Summary collapse
-
#props ⇒ Object
readonly
Returns the value of attribute props.
Instance Method Summary collapse
-
#initialize(props) ⇒ Typer
constructor
A new instance of Typer.
-
#type ⇒ Object
IE: git or registry.
Methods included from Concerns::NotationConcern
#clean_notation, #ref, #remove_host, #remove_notations, #remove_ref_notation, #remove_subfolder_notation, #subfolder
Methods included from Concerns::LocalConcern
Constructor Details
#initialize(props) ⇒ Typer
Returns a new instance of Typer.
9 10 11 |
# File 'lib/terraspace_bundler/mod/props/typer.rb', line 9 def initialize(props) @props = props # Props.new object end |
Instance Attribute Details
#props ⇒ Object (readonly)
Returns the value of attribute props.
8 9 10 |
# File 'lib/terraspace_bundler/mod/props/typer.rb', line 8 def props @props end |
Instance Method Details
#type ⇒ Object
IE: git or registry
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/terraspace_bundler/mod/props/typer.rb', line 14 def type if source.include?('ssh://') "git" elsif source.include?('::') source.split('::').first # IE: git:: s3:: gcs:: elsif local? "local" elsif registry? "registry" else "git" end end |