Class: Sal::Class
- Inherits:
-
Object
- Object
- Sal::Class
- Defined in:
- lib/sal/class.rb
Overview
The class repressents a class in the code
Instance Attribute Summary collapse
-
#item ⇒ Object
Returns the value of attribute item.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#functions ⇒ Object
Getter for the functions (lazy loading).
-
#initialize(item) ⇒ Class
constructor
A new instance of Class.
Constructor Details
#initialize(item) ⇒ Class
Returns a new instance of Class.
8 9 10 11 12 13 14 |
# File 'lib/sal/class.rb', line 8 def initialize( item ) @item = item item.code.chomp =~ /^(.*? Class): (.*)$/ @type = $1 @name = $2 @functions = nil end |
Instance Attribute Details
#item ⇒ Object
Returns the value of attribute item.
16 17 18 |
# File 'lib/sal/class.rb', line 16 def item @item end |
#name ⇒ Object
Returns the value of attribute name.
16 17 18 |
# File 'lib/sal/class.rb', line 16 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
16 17 18 |
# File 'lib/sal/class.rb', line 16 def type @type end |
Instance Method Details
#functions ⇒ Object
Getter for the functions (lazy loading)
19 20 21 22 23 24 |
# File 'lib/sal/class.rb', line 19 def functions if( @functions.nil? ) _analyze end return @functions end |