Skip to content

undefined method print_msg #10

@robinboening

Description

@robinboening

Hey there!

I am playing around with this gem to see if it might replace the current fit_parser gem we're using as its using Ruby's bindata gem behind the scenes which is rather slow and memory hungry.

However, I tried parsing a file as described in the README and immediately ran into an undefined method print_msg error. I found this line

rb_funcall(handler, rb_intern("print_msg"), 1, rb_str_new2(msg));
trying to call this ruby method which obviously doesn't exist in Ruby's standard lib.

I was able to get around this issue by quickly adding this method inside the Object class which is certainly not right, but helped me continue playing around more.

I am confused about the print_msg call though and I'd like to ask what is the intention behind it and how is it supposed to be handled?

EDIT:

I came back to it later today and understood the print_msg is called on the handler which is the Callback class, so the method needs to be implemented on an instance level, takes the message as an argument and is supposed to simply print out its input. Right?

Thanks
Robin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions