Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Do not raise exception if eric binaries are not available #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

yuryromanov
Copy link

No description provided.

def self.attach_eric_function(name, params, return_type, original_name = nil)
define_method(name) { |*options| true }
end
extend self

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to understand - why you need to extend self?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It defines an instance method in the receiver https://apidock.com/ruby/Module/define_method
Here we are using Module so the "extend self" keeps the instance methods public.

Anyway I changed this code. Now I will use define_singleton_method that doesn't require "extend self"

Copy link

@bryszard bryszard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one question

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

Successfully merging this pull request may close these issues.

2 participants