Module: ChangelogsHelper

Defined in:
lib/nexmo_developer/app/helpers/changelogs_helper.rb

Instance Method Summary collapse

Instance Method Details

#build_volta_icon(element) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/nexmo_developer/app/helpers/changelogs_helper.rb', line 2

def build_volta_icon(element)
  return '' unless element

  if element.scan(/vonage-(\w+)-sdk/).present?
    element.scan(/vonage-(\w+)-sdk/).flatten.first.downcase
  elsif element.scan(/(\w+) SDK/).present?
    element.scan(/(\w+) SDK/).flatten.first.downcase
  elsif element.scan(/(\w+)-cli/).present?
    element.scan(/(\w+)-cli/).flatten.first.downcase
  end
end