Class: PwData

Inherits:
Object
  • Object
show all
Defined in:
lib/rbpw/pw_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keyObject

Returns the value of attribute key.



5
6
7
# File 'lib/rbpw/pw_data.rb', line 5

def key
  @key
end

Instance Method Details

#get_json_valueObject



27
28
29
30
31
32
# File 'lib/rbpw/pw_data.rb', line 27

def get_json_value
  hash = Hash.new
  hash.store(:username, @username)
  hash.store(:password, @password)
  hash.to_json
end

#get_passwordObject



22
23
24
25
# File 'lib/rbpw/pw_data.rb', line 22

def get_password
  value =  @password
  value
end

#get_usernameObject



13
14
15
16
# File 'lib/rbpw/pw_data.rb', line 13

def get_username
  value = @username
  value
end

#set_password(value) ⇒ Object



18
19
20
# File 'lib/rbpw/pw_data.rb', line 18

def set_password(value)
  @password = value
end

#set_username(value) ⇒ Object



9
10
11
# File 'lib/rbpw/pw_data.rb', line 9

def set_username(value)
  @username = value
end