class FroyoApi::Password

Attributes

length[R]
password[R]

Public Class Methods

new(length = 8) click to toggle source
# File lib/froyo_api/password.rb, line 5
def initialize(length = 8)
  @length = length
  @password = generate
end

Private Instance Methods

generate() click to toggle source
# File lib/froyo_api/password.rb, line 16
def generate
  request(path)['attributes']['password']
end
path() click to toggle source
# File lib/froyo_api/password.rb, line 12
def path
  "pwd?length=#{length}"
end