class JsDuck::Tag::CssVar
Public Class Methods
new()
click to toggle source
# File lib/jsduck/tag/css_var.rb, line 5 def initialize @pattern = "var" @tagname = :css_var @member_type = { :title => "CSS Variables", :toolbar_title => "CSS Vars", :position => MEMBER_POS_CSS_VAR, :icon => File.dirname(__FILE__) + "/icons/css_var.png" } end
Public Instance Methods
merge(h, docs, code)
click to toggle source
Set default value for :type field
# File lib/jsduck/tag/css_var.rb, line 42 def merge(h, docs, code) h[:type] = "Object" unless h[:type] end
parse_doc(p, pos)
click to toggle source
@var {Type} [name=default] …
# File lib/jsduck/tag/css_var.rb, line 17 def parse_doc(p, pos) p.standard_tag({ :tagname => :css_var, :type => true, :name => true, :default => true, :optional => true }) end
process_code(code)
click to toggle source
Calls superclass method
# File lib/jsduck/tag/css_var.rb, line 34 def process_code(code) h = super(code) h[:type] = code[:type] h[:default] = code[:default] h end
process_doc(h, tags, pos)
click to toggle source
# File lib/jsduck/tag/css_var.rb, line 27 def process_doc(h, tags, pos) p = tags[0] h[:name] = p[:name] h[:type] = p[:type] h[:default] = p[:default] end
to_html(var, cls)
click to toggle source
# File lib/jsduck/tag/css_var.rb, line 46 def to_html(var, cls) member_link(var) + " : " + var[:html_type] end