Class: TypeCode
- Inherits:
-
Object
- Object
- TypeCode
- Defined in:
- lib/retrospec/type_code.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#scope_name ⇒ Object
readonly
Returns the value of attribute scope_name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#variables ⇒ Object
readonly
returns a list of variables found in the main code block.
Instance Method Summary collapse
-
#has_parent? ⇒ Boolean
need to figure out a way to load the parent or dependent manfifests.
-
#initialize(type) ⇒ TypeCode
constructor
TODO figure out how to store vardef statements that are contained inside conditional blocks.
Constructor Details
#initialize(type) ⇒ TypeCode
TODO figure out how to store vardef statements that are contained inside conditional blocks
9 10 11 12 13 14 15 |
# File 'lib/retrospec/type_code.rb', line 9 def initialize(type) raise TypeNotFoundException unless type @scope_name = type.namespace @name = type.name @type = type @parent = type.parent end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/retrospec/type_code.rb', line 6 def name @name end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
6 7 8 |
# File 'lib/retrospec/type_code.rb', line 6 def parent @parent end |
#scope_name ⇒ Object (readonly)
Returns the value of attribute scope_name.
6 7 8 |
# File 'lib/retrospec/type_code.rb', line 6 def scope_name @scope_name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/retrospec/type_code.rb', line 6 def type @type end |
#variables ⇒ Object (readonly)
returns a list of variables found in the main code block
22 23 24 |
# File 'lib/retrospec/type_code.rb', line 22 def variables @variables end |
Instance Method Details
#has_parent? ⇒ Boolean
need to figure out a way to load the parent or dependent manfifests
17 18 19 |
# File 'lib/retrospec/type_code.rb', line 17 def has_parent? @parent.nil? end |