Class: RubyGPG2::UserID

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_gpg2/user_id.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ UserID

Returns a new instance of UserID.



13
14
15
16
17
18
19
20
21
22
# File 'lib/ruby_gpg2/user_id.rb', line 13

def initialize(opts)
  @name = opts[:name]
  @comment = opts[:comment]
  @email = opts[:email]
  @validity = opts[:validity]
  @creation_date = opts[:creation_date]
  @expiration_date = opts[:expiration_date]
  @hash = opts[:hash]
  @origin = opts[:origin]
end

Instance Attribute Details

#commentObject (readonly)

Returns the value of attribute comment.



3
4
5
# File 'lib/ruby_gpg2/user_id.rb', line 3

def comment
  @comment
end

#creation_dateObject (readonly)

Returns the value of attribute creation_date.



3
4
5
# File 'lib/ruby_gpg2/user_id.rb', line 3

def creation_date
  @creation_date
end

#emailObject (readonly)

Returns the value of attribute email.



3
4
5
# File 'lib/ruby_gpg2/user_id.rb', line 3

def email
  @email
end

#expiration_dateObject (readonly)

Returns the value of attribute expiration_date.



3
4
5
# File 'lib/ruby_gpg2/user_id.rb', line 3

def expiration_date
  @expiration_date
end

#hashObject (readonly)

Returns the value of attribute hash.



3
4
5
# File 'lib/ruby_gpg2/user_id.rb', line 3

def hash
  @hash
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/ruby_gpg2/user_id.rb', line 3

def name
  @name
end

#originObject (readonly)

Returns the value of attribute origin.



3
4
5
# File 'lib/ruby_gpg2/user_id.rb', line 3

def origin
  @origin
end

#validityObject (readonly)

Returns the value of attribute validity.



3
4
5
# File 'lib/ruby_gpg2/user_id.rb', line 3

def validity
  @validity
end

Instance Method Details

#==(other) ⇒ Object



24
25
26
# File 'lib/ruby_gpg2/user_id.rb', line 24

def ==(other)
  other.class == self.class && other.state == state
end