Class: Keybox::HostAccountEntry

Inherits:
AccountEntry show all
Defined in:
lib/keybox/entry.rb

Overview

Host Accounts are those typical login accounts on machines. These contain at a minimum the fields:

- title
- hostname
- username
- pasword
- additional_info

Since HostAccountEntry is a descendant of Keybox::Storage::Record other fields may be added dynamically.

Constant Summary

Constants inherited from Storage::Record

Storage::Record::PROTECTED_METHODS

Instance Attribute Summary

Attributes inherited from Storage::Record

#creation_time, #data_members, #last_access_time, #modification_time, #uuid

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AccountEntry

#default_fields, #display_fields, display_fields, #each, #fields, #max_field_length, #needs_container_passphrase?, private_field?, #private_field?, #private_fields, #to_s, #values, visible_field?, #visible_field?, #visible_fields, visible_fields

Methods inherited from Storage::Record

#==, #data_member_names, #eql?, #method_missing, #modified=, #modified?, #to_yaml_properties

Constructor Details

#initialize(title = "", hostname = "", username = "", password = "") ⇒ HostAccountEntry

Returns a new instance of HostAccountEntry.



137
138
139
140
141
# File 'lib/keybox/entry.rb', line 137

def initialize(title = "",hostname = "",username = "",password = "")
    super(title,username)
    self.hostname = hostname
    self.password = password
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Keybox::Storage::Record

Class Method Details

.default_fieldsObject



128
129
130
# File 'lib/keybox/entry.rb', line 128

def default_fields
    %w(title hostname username password additional_info)
end

.private_fieldsObject



132
133
134
# File 'lib/keybox/entry.rb', line 132

def private_fields
    %w(password)
end