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.



16
17
18
19
20
21
22
23
24
25
# File 'lib/ruby_gpg2/user_id.rb', line 16

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.



5
6
7
# File 'lib/ruby_gpg2/user_id.rb', line 5

def comment
  @comment
end

#creation_dateObject (readonly)

Returns the value of attribute creation_date.



5
6
7
# File 'lib/ruby_gpg2/user_id.rb', line 5

def creation_date
  @creation_date
end

#emailObject (readonly)

Returns the value of attribute email.



5
6
7
# File 'lib/ruby_gpg2/user_id.rb', line 5

def email
  @email
end

#expiration_dateObject (readonly)

Returns the value of attribute expiration_date.



5
6
7
# File 'lib/ruby_gpg2/user_id.rb', line 5

def expiration_date
  @expiration_date
end

#hashObject (readonly)

Returns the value of attribute hash.



5
6
7
# File 'lib/ruby_gpg2/user_id.rb', line 5

def hash
  @hash
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/ruby_gpg2/user_id.rb', line 5

def name
  @name
end

#originObject (readonly)

Returns the value of attribute origin.



5
6
7
# File 'lib/ruby_gpg2/user_id.rb', line 5

def origin
  @origin
end

#validityObject (readonly)

Returns the value of attribute validity.



5
6
7
# File 'lib/ruby_gpg2/user_id.rb', line 5

def validity
  @validity
end

Instance Method Details

#==(other) ⇒ Object



27
28
29
# File 'lib/ruby_gpg2/user_id.rb', line 27

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