Class: String
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.random_token(length = 12) ⇒ Object
18 19 20 |
# File 'lib/smooth/ext/core.rb', line 18 def self.random_token(length = 12) rand(36**36).to_s(36).slice(0, length) end |
Instance Method Details
#empty? ⇒ Boolean
14 15 16 |
# File 'lib/smooth/ext/core.rb', line 14 def empty? length == 0 end |