Class: Erlapi::Parser::Module
- Inherits:
-
Object
- Object
- Erlapi::Parser::Module
- Defined in:
- lib/erlapi/parser.rb
Instance Attribute Summary collapse
-
#datatypes ⇒ Object
Returns the value of attribute datatypes.
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#doc ⇒ Object
Returns the value of attribute doc.
-
#funcs ⇒ Object
Returns the value of attribute funcs.
-
#parser ⇒ Object
Returns the value of attribute parser.
-
#sections ⇒ Object
Returns the value of attribute sections.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#title ⇒ Object
Returns the value of attribute title.
-
#valid ⇒ Object
Returns the value of attribute valid.
Instance Method Summary collapse
- #define_desc ⇒ Object
- #define_funcs ⇒ Object
- #define_sections ⇒ Object
-
#initialize(parser, doc) ⇒ Module
constructor
A new instance of Module.
Constructor Details
#initialize(parser, doc) ⇒ Module
Returns a new instance of Module.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/erlapi/parser.rb', line 63 def initialize(parser, doc) self.doc = doc self.parser = parser self.title = doc.css('module').inner_html self.summary = doc.css('modulesummary').inner_html || '' if self.title && self.title != '' self.valid = true else self.valid = false end if valid define_desc define_sections define_funcs end end |
Instance Attribute Details
#datatypes ⇒ Object
Returns the value of attribute datatypes.
62 63 64 |
# File 'lib/erlapi/parser.rb', line 62 def datatypes @datatypes end |
#desc ⇒ Object
Returns the value of attribute desc.
62 63 64 |
# File 'lib/erlapi/parser.rb', line 62 def desc @desc end |
#doc ⇒ Object
Returns the value of attribute doc.
62 63 64 |
# File 'lib/erlapi/parser.rb', line 62 def doc @doc end |
#funcs ⇒ Object
Returns the value of attribute funcs.
62 63 64 |
# File 'lib/erlapi/parser.rb', line 62 def funcs @funcs end |
#parser ⇒ Object
Returns the value of attribute parser.
62 63 64 |
# File 'lib/erlapi/parser.rb', line 62 def parser @parser end |
#sections ⇒ Object
Returns the value of attribute sections.
62 63 64 |
# File 'lib/erlapi/parser.rb', line 62 def sections @sections end |
#summary ⇒ Object
Returns the value of attribute summary.
62 63 64 |
# File 'lib/erlapi/parser.rb', line 62 def summary @summary end |
#title ⇒ Object
Returns the value of attribute title.
62 63 64 |
# File 'lib/erlapi/parser.rb', line 62 def title @title end |
#valid ⇒ Object
Returns the value of attribute valid.
62 63 64 |
# File 'lib/erlapi/parser.rb', line 62 def valid @valid end |
Instance Method Details
#define_desc ⇒ Object
80 81 82 |
# File 'lib/erlapi/parser.rb', line 80 def define_desc self.desc = self.parser.(self.parser.inner_xml(doc.css('description'))) end |