Class: Ryodo::Domain::DomainString
Overview
DomainString is a String with extended methods
Instance Method Summary collapse
- #reverse ⇒ Object (also: #r)
- #to_a(option = nil) ⇒ Object
Methods inherited from String
Instance Method Details
#reverse ⇒ Object 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 |