Class: MKBrut::AppId

Inherits:
InternetIdentifier show all
Defined in:
lib/mkbrut/app_id.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from InternetIdentifier

#to_s

Constructor Details

#initialize(value) ⇒ AppId

Returns a new instance of AppId.



5
6
7
# File 'lib/mkbrut/app_id.rb', line 5

def initialize(value)
  super(:app_id, value)
end

Class Method Details

.from_app_name(app_name) ⇒ Object



2
3
4
# File 'lib/mkbrut/app_id.rb', line 2

def self.from_app_name(app_name)
  self.new(app_name.to_s.gsub(/[^a-zA-Z0-9\-]/, "-").downcase)
end