We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prawn version: 2.2.0
class PdfWorksheet < Prawn::Document def initialize(doc) super('top_margin' => 85) # works super(top_margin: 85) # Does not end end
The piece of code responsible is at: lib/prawn/document.rb:724
sides.zip(positions).each do |side, pos| new_margin = options["#{side}_margin"] || (margin[pos] if pos) state.page.margins[side] = new_margin if new_margin end
Is it possible to make it accept symbols and strings as options?
Something like: new_margin = options["#{side}_margin"] || options["#{side}_margin".to_sym] || (margin[pos] if pos)
new_margin = options["#{side}_margin"] || options["#{side}_margin".to_sym] || (margin[pos] if pos)
According to the documentation it should take in a key http://www.rubydoc.info/github/sandal/prawn/Prawn%2FDocument%3Ainitialize
The text was updated successfully, but these errors were encountered:
breaks my specs in prawn-templates as well
Sorry, something went wrong.
rubocop (part 2)
dc761af
this was introduced by #963 and would be (partly) fixed with #1003
Fixed in 2.2.1
No branches or pull requests
Prawn version: 2.2.0
The piece of code responsible is at: lib/prawn/document.rb:724
Is it possible to make it accept symbols and strings as options?
Something like:
new_margin = options["#{side}_margin"] || options["#{side}_margin".to_sym] || (margin[pos] if pos)
According to the documentation it should take in a key
http://www.rubydoc.info/github/sandal/prawn/Prawn%2FDocument%3Ainitialize
The text was updated successfully, but these errors were encountered: