Method: Pkg::Util::Git_tag#split_ref
- Defined in:
- lib/packaging/util/git_tags.rb
#split_ref(ref) ⇒ Object
Split the ref based on slashes, set ref_name and ref_type based on the last two items from the split. i.e. refs/tags/1.1.1 would return:
@ref_name => 1.1.1 @ref_type =>
36 37 38 39 40 41 |
# File 'lib/packaging/util/git_tags.rb', line 36 def split_ref(ref) ref_parts = ref.split('/', 3) @ref_name = ref_parts.pop @ref_type = ref_parts.pop [@ref_type, @ref_name] end |