Permalink
Browse files

Updated BBVar to use setter methods from BBCommon/BBMember initialize…

… instead of setting variables directly.
  • Loading branch information...
nilium committed Mar 24, 2009
1 parent 9aca644 commit c67e9df34c59e7565c5b38a22a289ac77bfbc255
Showing with 9 additions and 8 deletions.
  1. +9 −8 bbvar.rb
View
@@ -22,20 +22,21 @@ class BBVar < BBMember
def initialize(value, lineNumber, page, memberType, isExtern, isPrivate)
md = VALUE_REGEX.match(value)
- if (@type = md[:typename]).nil? then
- @type = "Int"
+ if (type = md[:typename]).nil? then
+ type = "Int"
elsif md[:fulltype] then
- @type.slice!(/^:\s*/)
+ type.slice!(/^:\s*/)
elsif shortcut = md[:shortcut] then
- @type[0,shortcut.length] = TYPE_SHORTCUTS[shortcut]
+ type[0,shortcut.length] = TYPE_SHORTCUTS[shortcut]
end
- @name = md[:name]
+ super(md[:name], type, page)
+
@defaultValue = md[:value]
- @startingLineNumber = @endingLineNumber = lineNumber
+ self.startingLineNumber = self.endingLineNumber = lineNumber
- @isExtern = isExtern
- @isPrivate = isPrivate
+ self.isExtern = isExtern
+ self.isPrivate = isPrivate
@memberType = memberType
end

0 comments on commit c67e9df

Please sign in to comment.