Class: Entypo::Charmap
- Inherits:
-
Object
- Object
- Entypo::Charmap
- Defined in:
- lib/entypo/charmap.rb
Overview
The Charmap simply “parses” a CSS file which must conform to the following format:
.icon$NAME$:before { content: …} /* $codepoint$ */
Defined Under Namespace
Classes: Icon
Instance Attribute Summary collapse
-
#icons ⇒ Object
readonly
Access the icons array.
Class Method Summary collapse
-
.icons ⇒ Object
Public: Returns Array of icons.
-
.instance ⇒ Object
Public: Access the shared instance based on our default entypo.scss file.
Instance Method Summary collapse
-
#initialize(path) ⇒ Charmap
constructor
A new instance of Charmap.
Constructor Details
#initialize(path) ⇒ Charmap
Returns a new instance of Charmap.
32 33 34 |
# File 'lib/entypo/charmap.rb', line 32 def initialize(path) @icons = load(path) end |
Instance Attribute Details
#icons ⇒ Object (readonly)
Access the icons array.
30 31 32 |
# File 'lib/entypo/charmap.rb', line 30 def icons @icons end |
Class Method Details
.icons ⇒ Object
Public: Returns Array of icons.
Returns Array of Icon instances.
25 26 27 |
# File 'lib/entypo/charmap.rb', line 25 def self.icons instance.icons end |
.instance ⇒ Object
Public: Access the shared instance based on our default entypo.scss file.
Returns Charmap instance.
18 19 20 |
# File 'lib/entypo/charmap.rb', line 18 def self.instance @@instance ||= self.new File.('../../../app/assets/stylesheets/entypo.scss.erb', __FILE__) end |