Module: Vanillicons::InstanceMethods
- Defined in:
- lib/vanillicons.rb
Instance Method Summary collapse
Instance Method Details
#vanillicon_hash ⇒ Object
45 46 47 48 |
# File 'lib/vanillicons.rb', line 45 def vanillicon_hash # Generate hash based on field set Digest::MD5.hexdigest(send(vanillicon_field).to_s) end |
#vanillicon_id(size) ⇒ Object
50 51 52 |
# File 'lib/vanillicons.rb', line 50 def vanillicon_id(size) "#{vanillicon_hash}_#{exact_or_larger_size(size)}" end |
#vanillicon_url(options = {}) ⇒ Object
38 39 40 41 42 43 |
# File 'lib/vanillicons.rb', line 38 def vanillicon_url( = {}) = .is_a?(Hash) ? : {} = self.class..merge() vanillicon_host([:secure]) + vanillicon_id([:size]) + vanillicon_image_extension end |