Class: PicCertificate

Inherits:
Object
  • Object
show all
Defined in:
lib/rfetion/pic_certificate.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pid, pic, algorithm) ⇒ PicCertificate

Returns a new instance of PicCertificate.



4
5
6
7
8
# File 'lib/rfetion/pic_certificate.rb', line 4

def initialize(pid, pic, algorithm)
  @pid = pid
  @pic = pic
  @algorithm = algorithm
end

Instance Attribute Details

#algorithmObject (readonly)

Returns the value of attribute algorithm.



2
3
4
# File 'lib/rfetion/pic_certificate.rb', line 2

def algorithm
  @algorithm
end

#picObject (readonly)

Returns the value of attribute pic.



2
3
4
# File 'lib/rfetion/pic_certificate.rb', line 2

def pic
  @pic
end

#pidObject (readonly)

Returns the value of attribute pid.



2
3
4
# File 'lib/rfetion/pic_certificate.rb', line 2

def pid
  @pid
end

Class Method Details

.parse(c, algorithm) ⇒ Object



10
11
12
# File 'lib/rfetion/pic_certificate.rb', line 10

def self.parse(c, algorithm)
  PicCertificate.new(c['id'], c['pic'], algorithm)
end

Instance Method Details

#to_json(*args) ⇒ Object



14
15
16
# File 'lib/rfetion/pic_certificate.rb', line 14

def to_json(*args)
  {:pid => @pid, :pic => @pic, :algorithm => @algorithm}
end