Class: PkiExpress::PadesVisualRepresentation
- Inherits:
-
Object
- Object
- PkiExpress::PadesVisualRepresentation
- Defined in:
- lib/pki_express/pades_visual_representation.rb
Instance Attribute Summary collapse
-
#image ⇒ Object
Returns the value of attribute image.
-
#position ⇒ Object
Returns the value of attribute position.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text = nil, image = nil, position = nil) ⇒ PadesVisualRepresentation
constructor
A new instance of PadesVisualRepresentation.
- #to_model ⇒ Object
Constructor Details
#initialize(text = nil, image = nil, position = nil) ⇒ PadesVisualRepresentation
Returns a new instance of PadesVisualRepresentation.
5 6 7 8 9 |
# File 'lib/pki_express/pades_visual_representation.rb', line 5 def initialize(text=nil, image=nil, position=nil) @text = text @image = image @position = position end |
Instance Attribute Details
#image ⇒ Object
Returns the value of attribute image.
3 4 5 |
# File 'lib/pki_express/pades_visual_representation.rb', line 3 def image @image end |
#position ⇒ Object
Returns the value of attribute position.
3 4 5 |
# File 'lib/pki_express/pades_visual_representation.rb', line 3 def position @position end |
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/pki_express/pades_visual_representation.rb', line 3 def text @text end |
Instance Method Details
#to_model ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/pki_express/pades_visual_representation.rb', line 11 def to_model unless @position raise new 'The visual representation position was not set' end { position: @position&.to_model, text: @text&.to_model, image: @image&.to_model, } end |