Class: Erlapi::Parser::Func
- Inherits:
-
Object
- Object
- Erlapi::Parser::Func
- Defined in:
- lib/erlapi/parser.rb
Instance Attribute Summary collapse
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#names ⇒ Object
Returns the value of attribute names.
-
#p_module ⇒ Object
Returns the value of attribute p_module.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#short_name ⇒ Object
Returns the value of attribute short_name.
-
#short_names ⇒ Object
Returns the value of attribute short_names.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#types ⇒ Object
Returns the value of attribute types.
Instance Method Summary collapse
-
#initialize(p_module, node) ⇒ Func
constructor
A new instance of Func.
- #parser ⇒ Object
Constructor Details
#initialize(p_module, node) ⇒ Func
Returns a new instance of Func.
103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/erlapi/parser.rb', line 103 def initialize(p_module, node) self.p_module = p_module self.names = node.css('name').map {|v| v.inner_html} if self.names self.short_names = self.names.map { |n| n.match(/([\w\d_-]*)\(/) ? $~[1] : nil }.compact.uniq self.short_name = self.short_names.first if self.short_names end self.ref = self.names.first.gsub(/[^\w]/, '') self.summary = parser.inner_xml(node.css('fsummary')) self.types = parser.(parser.inner_xml(node.css('type'))) self.desc = parser.(parser.inner_xml(node.css('desc'))) end |
Instance Attribute Details
#desc ⇒ Object
Returns the value of attribute desc.
101 102 103 |
# File 'lib/erlapi/parser.rb', line 101 def desc @desc end |
#names ⇒ Object
Returns the value of attribute names.
101 102 103 |
# File 'lib/erlapi/parser.rb', line 101 def names @names end |
#p_module ⇒ Object
Returns the value of attribute p_module.
101 102 103 |
# File 'lib/erlapi/parser.rb', line 101 def p_module @p_module end |
#ref ⇒ Object
Returns the value of attribute ref.
101 102 103 |
# File 'lib/erlapi/parser.rb', line 101 def ref @ref end |
#short_name ⇒ Object
Returns the value of attribute short_name.
101 102 103 |
# File 'lib/erlapi/parser.rb', line 101 def short_name @short_name end |
#short_names ⇒ Object
Returns the value of attribute short_names.
101 102 103 |
# File 'lib/erlapi/parser.rb', line 101 def short_names @short_names end |
#summary ⇒ Object
Returns the value of attribute summary.
101 102 103 |
# File 'lib/erlapi/parser.rb', line 101 def summary @summary end |
#types ⇒ Object
Returns the value of attribute types.
101 102 103 |
# File 'lib/erlapi/parser.rb', line 101 def types @types end |
Instance Method Details
#parser ⇒ Object
116 117 118 |
# File 'lib/erlapi/parser.rb', line 116 def parser self.p_module.parser end |