class String

Public Instance Methods

as_json() click to toggle source
# File lib/actn/core_ext/string.rb, line 7
def as_json
  Oj.load(self)
end
to_domain() click to toggle source
# File lib/actn/core_ext/string.rb, line 10
def to_domain
  return self unless self.start_with?("http")
  self.match(/[http|http]:\/\/(\w*:\d*|\w*)\/?/)[1] rescue nil
end
to_json() click to toggle source
# File lib/actn/core_ext/string.rb, line 4
def to_json
  self
end