https://github.com/code-lever/ms-binary-resources
A Ruby implementation of a reader for Microsoft's binary resource file format.
https://github.com/code-lever/ms-binary-resources
Last synced: about 1 year ago
JSON representation
A Ruby implementation of a reader for Microsoft's binary resource file format.
- Host: GitHub
- URL: https://github.com/code-lever/ms-binary-resources
- Owner: code-lever
- License: mit
- Created: 2014-08-07T20:31:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-07-24T14:37:35.000Z (over 7 years ago)
- Last Synced: 2025-03-02T03:26:08.403Z (about 1 year ago)
- Language: Ruby
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Ms::BinaryResources [](https://travis-ci.org/code-lever/ms-binary-resources) [](https://codeclimate.com/github/code-lever/ms-binary-resources)
A way to read Microsoft's binary resource files in Ruby.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'ms-binary-resources'
```
And then execute:
```
$ bundle
```
Or install it yourself as:
```
$ gem install ms-binary-resources
```
## Usage
```ruby
reader = Ms::BinaryResources::Reader.new('/path/to/File.resources')
reader.keys
=> ['key1', 'key2', ...]
reader.key? 'key1'
=> true
reader.key? 'keyxx'
=> false
reader['key1']
=> 'some value'
reader.type_of 'key2'
=> :int32
reader['key2']
=> 8675309
```
## Caveats
Currently only string, uint and int value types are supported. Pull requests with additional types are great, include tests!
## Thanks
This is largely cribbed off of the [Mono Project's](https://github.com/mono/mono) class library implementation of ResourceReader and friends.
## Contributing
1. Fork it ( https://github.com/code-lever/ms-binary-resources/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request