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

Define Instance, Module, etc. inside Wasmer module #4

Merged
merged 1 commit into from
May 7, 2019

Conversation

irxground
Copy link
Contributor

PHP has a namespace feature but Ruby does not. In Ruby, we define classes inside of module instead.

module Wasmer
  class Instance
    def initialize
      # ...
    end
  end
end

instance = Wasmer::Instance.new()

I changed to define classes inside the Wasmer module to prevent the global namespace from being polluted with generic name such as Module.

@Hywan Hywan merged commit 4766efb into wasmerio:master May 7, 2019
@Hywan
Copy link
Contributor

Hywan commented May 7, 2019

Thanks for the PR! It's much better like this :-).

@Hywan Hywan self-assigned this May 7, 2019
@Hywan Hywan added 🎉 enhancement New feature or request 📚 documentation Do you like to read? 📦 component-extension About the Ruby extension written in Rust 🧪 tests I love tests labels May 7, 2019
@irxground irxground deleted the def_under_wasmer branch May 7, 2019 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 component-extension About the Ruby extension written in Rust 📚 documentation Do you like to read? 🎉 enhancement New feature or request 🧪 tests I love tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants