Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sinsoku/mini_style
mini_style provides a simple helper
https://github.com/sinsoku/mini_style
Last synced: about 1 month ago
JSON representation
mini_style provides a simple helper
- Host: GitHub
- URL: https://github.com/sinsoku/mini_style
- Owner: sinsoku
- License: mit
- Created: 2015-05-28T11:59:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-07T09:35:07.000Z (over 9 years ago)
- Last Synced: 2023-03-11T01:53:12.533Z (almost 2 years ago)
- Language: Ruby
- Homepage:
- Size: 164 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Gem Version](https://badge.fury.io/rb/mini_style.svg)](http://badge.fury.io/rb/mini_style)
[![Build Status](https://travis-ci.org/sinsoku/mini_style.svg?branch=master)](https://travis-ci.org/sinsoku/mini_style)
[![Code Climate](https://img.shields.io/codeclimate/github/sinsoku/mini_style.svg)](https://codeclimate.com/github/sinsoku/mini_style)
[![Coverage Status](https://coveralls.io/repos/sinsoku/mini_style/badge.svg?branch=master)](https://coveralls.io/r/sinsoku/mini_style?branch=master)# MiniStyle
`mini_style` provides a simple helper.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'mini_style'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install mini_style
## Usage
in your views:
```ruby
style('alert')
# => 'alert'
``````ruby
style('alert', 'alert-danger': !!flash[:alert], 'alert-success': !!flash[:notice])
# => 'alert alert-success'
``````ruby
style('alert-danger': !!flash[:alert], 'alert-success': !!flash[:notice])
# => 'alert-success'
```## Contributing
1. Fork it ( https://github.com/[my-github-username]/mini_style/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