devel/rubygem-polyglot 0.3.5 DragonFly
Provides a registry of file types
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- MIT
- Categories
- devel, rubygems
- Package size
- 4.9 KiB, 9.7 KiB installed
Description
Polyglot provides a registry of file types that can be loaded by calling its improved version of 'require'. Each file extension that can be handled by a custom loader is registered by calling Polyglot.register('ext', <class>), and then you can simply require 'somefile', which will find and load 'somefile.ext' using your custom loader.
This supports the creation of DSLs having a syntax that is most appropriate to their purpose, instead of abusing the Ruby syntax.
Required files are attempted first using the normal Ruby loader, and if that fails, Polyglot conducts a search for a file having a supported extension.
In the other systems
| System | Port | Version |
|---|---|---|
| DragonFly | devel/rubygem-polyglot | 0.3.5 |
| FreeBSD | devel/rubygem-polyglot | 0.3.5 |
| MidnightBSD | devel/rubygem-polyglot | 0.3.5 |
| HardenedBSD | devel/rubygem-polyglot | 0.3.5 |
| GhostBSD | devel/rubygem-polyglot | 0.3.5 |
Install
Binary package:
pkg install rubygem-polyglot
From DPorts:
cd /usr/dports/devel/rubygem-polyglot && make install clean