Class: PicCertificate
- Inherits:
-
Object
- Object
- PicCertificate
- Defined in:
- lib/rfetion/pic_certificate.rb
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
readonly
Returns the value of attribute algorithm.
-
#pic ⇒ Object
readonly
Returns the value of attribute pic.
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pid, pic, algorithm) ⇒ PicCertificate
constructor
A new instance of PicCertificate.
- #to_json(*args) ⇒ Object
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
#algorithm ⇒ Object (readonly)
Returns the value of attribute algorithm.
2 3 4 |
# File 'lib/rfetion/pic_certificate.rb', line 2 def algorithm @algorithm end |
#pic ⇒ Object (readonly)
Returns the value of attribute pic.
2 3 4 |
# File 'lib/rfetion/pic_certificate.rb', line 2 def pic @pic end |
#pid ⇒ Object (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 |