Skip to content
New issue

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

Bug/design flaw in simpletable.rb #1

Closed
dkellett opened this issue Jul 5, 2011 · 1 comment
Closed

Bug/design flaw in simpletable.rb #1

dkellett opened this issue Jul 5, 2011 · 1 comment

Comments

@dkellett
Copy link

dkellett commented Jul 5, 2011

          lines.each do |line|
            pdf.send(:preprocess_text, line)

Assuming that the purpose of running text through the prepocessor is to have the text be altered by the prepocessing method, the above line of code throws the return away... whereas in the writer.rb text() method the following is done:

def text(text, options = {})
# Apply the filtering which will make underlining (and other items)
# function.
text = preprocess_text(text)

since the preprocess_text method in writer is the following:

def preprocess_text(text)
text
end

I would assume that the purpose for the method is to allow for overriding. As such the current design will not support that....

@metaskills
Copy link
Owner

I forked this project for Ruby 1.9 compatibility thinking it was needed for my day job. It turns out we have migrated first to PDFKit before our move to 1.9 and hence will not need this fork. Though I will not delete the fork as others have found it useful too, it is not a repo that should/will take poor design decisions from the orig author. Who ever that is :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants