Class: EasybillRestClient::Pdf
- Inherits:
-
Object
- Object
- EasybillRestClient::Pdf
- Defined in:
- lib/easybill_rest_client/pdf.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
- #filename ⇒ Object
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(filename:, content:) ⇒ Pdf
constructor
A new instance of Pdf.
Constructor Details
#initialize(filename:, content:) ⇒ Pdf
Returns a new instance of Pdf.
8 9 10 11 |
# File 'lib/easybill_rest_client/pdf.rb', line 8 def initialize(filename:, content:) @filename = filename @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
5 6 7 |
# File 'lib/easybill_rest_client/pdf.rb', line 5 def content @content end |
#filename ⇒ Object
17 18 19 |
# File 'lib/easybill_rest_client/pdf.rb', line 17 def filename @filename[/\.pdf\Z/i] ? @filename : "#{@filename}.pdf" end |
Instance Method Details
#empty? ⇒ Boolean
13 14 15 |
# File 'lib/easybill_rest_client/pdf.rb', line 13 def empty? content.empty? end |