Class: PageTemplate::CommentCommand
- Defined in:
- lib/PageTemplate/commands.rb
Overview
CommentCommand is a command that just returns nothing for its output, allowing the designer to populate their pages with PageTemplate-style comments as well.
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
-
#initialize(comment = '') ⇒ CommentCommand
constructor
Save the
comment
for to_s. -
#output(namespace = nil) ⇒ Object
output returns nothing.
- #to_s ⇒ Object
Constructor Details
#initialize(comment = '') ⇒ CommentCommand
Save the comment
for to_s
48 49 50 |
# File 'lib/PageTemplate/commands.rb', line 48 def initialize(comment='') @comment = comment end |
Instance Method Details
#output(namespace = nil) ⇒ Object
output returns nothing.
44 45 46 |
# File 'lib/PageTemplate/commands.rb', line 44 def output(namespace=nil) '' end |
#to_s ⇒ Object
51 52 53 |
# File 'lib/PageTemplate/commands.rb', line 51 def to_s "[ Comment: #{@comment} ]" end |