Semantic::Mapper
Takes some markup of the form:
<div class="p-author h-card">
<div class="form-field">
<label for="p-first-name" class="required">First Name</label>
<input type="text" id="p-first-name" class="p-first-name" name="p-first-name" data-mapping="first_name" required>
</div>
<div class="form-field">
<label for="p-last-name" class="required">Last Name</label>
<input type="text" id="p-last-name" class="p-last-name" name="p-last-name" data-mapping="last_name" required>
</div>
</div>
and returns an indifferent hash of the form:
{first_name: 'p-first-name', last_name: 'p-last-name'}
Installation
Add this line to your application's Gemfile:
gem 'semantic-mapper'
And then execute:
$ bundle
Or install it yourself as:
$ gem install semantic-mapper
Usage
TODO: Write usage instructions here
Contributing
- Fork it ( https://github.com/[my-github-username]/semantic-mapper/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request