Class: Ryodo::Domain::DomainString

Inherits:
String
  • Object
show all
Defined in:
lib/ryodo/domain.rb

Overview

DomainString is a String with extended methods

Instance Method Summary collapse

Methods inherited from String

#to_domain, #valid_domain?

Instance Method Details

#reverseObject Also known as: r



5
6
7
# File 'lib/ryodo/domain.rb', line 5

def reverse
  to_a(:r).join(".")
end

#to_a(option = nil) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/ryodo/domain.rb', line 10

def to_a(option = nil)
  case option
  when :reverse, :r
    dsplit.reverse
  else
    dsplit
  end
end