wilde-icons-gem
v0.0.4
Published
[![Gem Version](https://badge.fury.io/rb/wilde-icons.svg)](https://badge.fury.io/rb/wilde-icons)
Downloads
2
Readme
wilde-icons-gem
A ruby package containing the set of icons included in wilde, to be used within the scope of Ruby applications.
Installation
NOTE: This GEM is not published yet
Add this to your Gemfile
gem 'wilde-icons'
Then bundle install
.
Usage
The library exposes a class called WildeIcon
. To create an instance of the class:
icon = WildeIcons::WildeIcon.new("name_of_the_symbol")
The constructor takes two arguments:
symbol (required)
The name of the icon for the wilde icons catalog. If not provided, the creation of the object will raise an exception.
params
classes
: a string containing the classes to be applied to the svg tagwidth
: the width of the iconheight
: the height of the icon
How it works
The node package wilde-icons
is installed as dependency. This package exposes a json with a collection
of icon representations with four attributes: name, path, width and height. The goal of the library is to create
flexible svgs with the contents of the collection. For a given name, it takes the path and the size of the icon
and creates a string containing the svg element with the proper viewBox, width and height.
Development
Install the dependencies:
npm install
bundle install
Run the tests:
rake
Release
TODO