Class: LastKeeDiff::Entry
- Inherits:
-
Object
- Object
- LastKeeDiff::Entry
- Defined in:
- lib/last_kee_diff/entry.rb
Instance Attribute Summary collapse
-
#group_name ⇒ Object
readonly
Returns the value of attribute group_name.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(group_name, title, username, password, url) ⇒ Entry
constructor
A new instance of Entry.
- #key ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(group_name, title, username, password, url) ⇒ Entry
Returns a new instance of Entry.
5 6 7 8 9 10 11 |
# File 'lib/last_kee_diff/entry.rb', line 5 def initialize(group_name, title, username, password, url) @group_name = group_name @title = title @username = username @password = password @url = url end |
Instance Attribute Details
#group_name ⇒ Object (readonly)
Returns the value of attribute group_name.
3 4 5 |
# File 'lib/last_kee_diff/entry.rb', line 3 def group_name @group_name end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
3 4 5 |
# File 'lib/last_kee_diff/entry.rb', line 3 def password @password end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/last_kee_diff/entry.rb', line 3 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/last_kee_diff/entry.rb', line 3 def url @url end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
3 4 5 |
# File 'lib/last_kee_diff/entry.rb', line 3 def username @username end |
Instance Method Details
#key ⇒ Object
22 23 24 |
# File 'lib/last_kee_diff/entry.rb', line 22 def key "#{self.group_name}/#{self.title}" end |
#to_s ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/last_kee_diff/entry.rb', line 13 def to_s [ self.key, "Username: #{self.username}", "Password: #{self.password}", "URL: #{self.url}" ].join("\n\t") end |