Class: BrDanfe::CceLib::Protocol
- Inherits:
-
Object
- Object
- BrDanfe::CceLib::Protocol
- Defined in:
- lib/br_danfe/cce_lib/protocol.rb
Instance Method Summary collapse
-
#initialize(pdf, xml) ⇒ Protocol
constructor
A new instance of Protocol.
- #render ⇒ Object
Constructor Details
#initialize(pdf, xml) ⇒ Protocol
Returns a new instance of Protocol.
4 5 6 7 |
# File 'lib/br_danfe/cce_lib/protocol.rb', line 4 def initialize(pdf, xml) @pdf = pdf @xml = Nokogiri::XML(xml) end |
Instance Method Details
#render ⇒ Object
9 10 11 12 13 14 |
# File 'lib/br_danfe/cce_lib/protocol.rb', line 9 def render @pdf.box(height: 36) do @pdf.text I18n.t('cce.protocol'), size: 8, style: :bold @pdf.text protocol, pad: 5 end end |