Class: TargetDoc
- Inherits:
-
Object
- Object
- TargetDoc
- Defined in:
- lib/ruby_make_script/doc.rb
Instance Attribute Summary collapse
-
#arglist ⇒ Object
Returns the value of attribute arglist.
-
#descr ⇒ Object
Returns the value of attribute descr.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #add_arg(name, doc) ⇒ Object
- #add_descr(str) ⇒ Object
- #empty? ⇒ Boolean
- #form_str ⇒ Object
-
#initialize ⇒ TargetDoc
constructor
A new instance of TargetDoc.
- #set_name(name) ⇒ Object
Constructor Details
#initialize ⇒ TargetDoc
Returns a new instance of TargetDoc.
7 8 9 10 11 |
# File 'lib/ruby_make_script/doc.rb', line 7 def initialize() @arglist = [] @descr = "" @name = "" end |
Instance Attribute Details
#arglist ⇒ Object
Returns the value of attribute arglist.
3 4 5 |
# File 'lib/ruby_make_script/doc.rb', line 3 def arglist @arglist end |
#descr ⇒ Object
Returns the value of attribute descr.
4 5 6 |
# File 'lib/ruby_make_script/doc.rb', line 4 def descr @descr end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/ruby_make_script/doc.rb', line 5 def name @name end |
Instance Method Details
#add_arg(name, doc) ⇒ Object
16 17 18 |
# File 'lib/ruby_make_script/doc.rb', line 16 def add_arg(name, doc) @arglist += [[name, doc]] end |
#add_descr(str) ⇒ Object
20 21 22 |
# File 'lib/ruby_make_script/doc.rb', line 20 def add_descr(str) @descr += str + "\n" end |
#empty? ⇒ Boolean
24 25 26 |
# File 'lib/ruby_make_script/doc.rb', line 24 def empty?() @arglist == [] || @descr == "" end |
#form_str ⇒ Object
28 29 30 |
# File 'lib/ruby_make_script/doc.rb', line 28 def form_str() [@name, *@arglist].join(" ") end |
#set_name(name) ⇒ Object
12 13 14 |
# File 'lib/ruby_make_script/doc.rb', line 12 def set_name(name) @name = name end |