Class: JsDuck::Tag::CssMixin

Inherits:
MemberTag show all
Defined in:
lib/jsduck/tag/css_mixin.rb

Overview

As of now there is no @css_mixin tag available in CSS files. This class just exists to define that we have a member type called :css_mixin.

Constant Summary

Constants inherited from MemberTag

MemberTag::MEMBER_POS_CFG, MemberTag::MEMBER_POS_CSS_MIXIN, MemberTag::MEMBER_POS_CSS_VAR, MemberTag::MEMBER_POS_EVENT, MemberTag::MEMBER_POS_LISTENER, MemberTag::MEMBER_POS_METHOD, MemberTag::MEMBER_POS_PROPERTY

Constants inherited from Tag

Tag::POS_ASIDE, Tag::POS_DEFAULT, Tag::POS_DEPRECATED, Tag::POS_DOC, Tag::POS_ENUM, Tag::POS_FIRES, Tag::POS_LOCALDOC, Tag::POS_OVERRIDES, Tag::POS_PARAM, Tag::POS_PREVENTABLE, Tag::POS_PRIVATE, Tag::POS_RETURN, Tag::POS_SINCE, Tag::POS_SUBPROPERTIES, Tag::POS_TEMPLATE, Tag::POS_THROWS, Tag::PRIORITY_CLASS, Tag::PRIORITY_COMPONENT, Tag::PRIORITY_SINGLETON

Instance Attribute Summary

Attributes inherited from MemberTag

#member_type

Attributes inherited from Tag

#class_icon, #css, #ext_define_default, #ext_define_pattern, #html_position, #pattern, #repeatable, #signature, #tagname

Instance Method Summary collapse

Methods inherited from MemberTag

#member_link, #member_params

Methods inherited from Tag

descendants, #format, #parse_doc, #parse_ext_define, #process_doc

Constructor Details

#initializeCssMixin

Returns a new instance of CssMixin.



8
9
10
11
12
13
14
15
# File 'lib/jsduck/tag/css_mixin.rb', line 8

def initialize
  @tagname = :css_mixin
  @member_type = {
    :title => "CSS Mixins",
    :position => MEMBER_POS_CSS_MIXIN,
    :icon => File.dirname(__FILE__) + "/icons/css_mixin.png"
  }
end

Instance Method Details

#merge(h, docs, code) ⇒ Object



23
24
25
# File 'lib/jsduck/tag/css_mixin.rb', line 23

def merge(h, docs, code)
  JsDuck::ParamsMerger.merge(h, docs, code)
end

#process_code(code) ⇒ Object



17
18
19
20
21
# File 'lib/jsduck/tag/css_mixin.rb', line 17

def process_code(code)
  h = super(code)
  h[:params] = code[:params]
  h
end

#to_html(mixin, cls) ⇒ Object



27
28
29
# File 'lib/jsduck/tag/css_mixin.rb', line 27

def to_html(mixin, cls)
  member_link(mixin) + member_params(mixin[:params])
end