Class: Icons::Sprite::Reference
- Inherits:
-
Data
- Object
- Data
- Icons::Sprite::Reference
- Defined in:
- lib/icons/sprite/reference.rb
Instance Attribute Summary collapse
-
#library ⇒ Object
readonly
Returns the value of attribute library.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#variant ⇒ Object
readonly
Returns the value of attribute variant.
Instance Method Summary collapse
Instance Attribute Details
#library ⇒ Object (readonly)
Returns the value of attribute library
5 6 7 |
# File 'lib/icons/sprite/reference.rb', line 5 def library @library end |
#name ⇒ Object (readonly)
Returns the value of attribute name
5 6 7 |
# File 'lib/icons/sprite/reference.rb', line 5 def name @name end |
#variant ⇒ Object (readonly)
Returns the value of attribute variant
5 6 7 |
# File 'lib/icons/sprite/reference.rb', line 5 def variant @variant end |
Instance Method Details
#exists? ⇒ Boolean
16 17 18 19 20 |
# File 'lib/icons/sprite/reference.rb', line 16 def exists? File.exist?(file_path) rescue Icons::IconNotFound false end |
#file_path ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/icons/sprite/reference.rb', line 8 def file_path Icons::Icon::FilePath.new( name: name.to_s, library: library.to_s, variant: variant.to_s ).call end |
#id ⇒ Object
6 |
# File 'lib/icons/sprite/reference.rb', line 6 def id = [library, variant, name].join("_") |