Class: SocialsRegex::Platforms

Inherits:
Object
  • Object
show all
Defined in:
lib/socials_regex/platforms.rb

Overview

all supported platforms

Constant Summary collapse

PLATFORM_FACEBOOK =
'facebook'
PLATFORM_GITHUB =
'github'
PLATFORM_LINKEDIN =
'linkedin'
PLATFORM_TWITTER =
'twitter'
PLATFORM_INSTAGRAM =
'instagram'
PLATFORM_YOUTUBE =
'youtube'
PLATFORM_EMAIL =
'email'
PLATFORM_HACKER_NEWS =
'hackernews'
PLATFORM_MEDIUM =
'medium'
PLATFORM_PHONE =
'phone'
PLATFORM_REDDIT =
'reddit'
PLATFORM_SKYPE =
'skype'
PLATFORM_SNAPCHAT =
'snapchat'
PLATFORM_STACKEXCHANGE =
'stackexchange'
PLATFORM_STACKOVERFLOW =
'stackoverflow'
PLATFORM_TELEGRAM =
'telegram'
PLATFORM_VIMEO =
'vimeo'
PLATFORM_XING =
'xing'
PLATFORM_ANGELLIST =
'angellist'
PLATFORM_CRUNCHBASE =
'crunchbase'
PLATFORM_STACKEXCHANGE_NETWORK =
'stackexchange network'
PLATFORM_WHATSAPP =
'whatsapp'
PLATFORM_YELP =
'yelp'

Class Method Summary collapse

Class Method Details

.allObject



30
31
32
# File 'lib/socials_regex/platforms.rb', line 30

def self.all
  Platforms.constants
end

.show(const_name:) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/socials_regex/platforms.rb', line 34

def self.show(const_name:)
  Platforms.const_get(const_name)
rescue NameError
  # raise Error,
  # "#{const_name} platform don't support please read our supported platforms =>  #{Platforms.all.join(',')}"
  ''
end