Class: Jekyll::GeoPatterns::SVGGeoPattern
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Jekyll::GeoPatterns::SVGGeoPattern
- Defined in:
- lib/jekyll-geo-pattern.rb
Instance Method Summary collapse
-
#initialize(tag_name, text, tokens) ⇒ SVGGeoPattern
constructor
A new instance of SVGGeoPattern.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, text, tokens) ⇒ SVGGeoPattern
Returns a new instance of SVGGeoPattern.
70 71 72 73 |
# File 'lib/jekyll-geo-pattern.rb', line 70 def initialize(tag_name, text, tokens) super @text = text end |
Instance Method Details
#render(context) ⇒ Object
75 76 77 78 79 80 81 |
# File 'lib/jekyll-geo-pattern.rb', line 75 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).svg_string end |