Class: Jekyll::GeoPatterns::UriImageGeoPattern
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Jekyll::GeoPatterns::UriImageGeoPattern
- Defined in:
- lib/jekyll-geo-pattern.rb
Instance Method Summary collapse
-
#initialize(tag_name, text, tokens) ⇒ UriImageGeoPattern
constructor
A new instance of UriImageGeoPattern.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, text, tokens) ⇒ UriImageGeoPattern
Returns a new instance of UriImageGeoPattern.
83 84 85 86 |
# File 'lib/jekyll-geo-pattern.rb', line 83 def initialize(tag_name, text, tokens) super @text = text end |
Instance Method Details
#render(context) ⇒ Object
88 89 90 91 92 93 94 |
# File 'lib/jekyll-geo-pattern.rb', line 88 def render(context) opts = GeoPatterns.(@text, context) raise ArgumentError, "You must have the :text property passed in" if opts[:text].nil? GeoPattern.generate(opts[:text], opts).uri_image end |