Class: Zebra::Zpl::Comment
- Inherits:
-
Object
- Object
- Zebra::Zpl::Comment
- Defined in:
- lib/zebra/zpl/comment.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Comment
constructor
A new instance of Comment.
- #to_zpl ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Comment
Returns a new instance of Comment.
6 7 8 |
# File 'lib/zebra/zpl/comment.rb', line 6 def initialize( = {}) .each_pair { |attribute, value| self.__send__ "#{attribute}=", value } end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
4 5 6 |
# File 'lib/zebra/zpl/comment.rb', line 4 def data @data end |
Instance Method Details
#to_zpl ⇒ Object
10 11 12 |
# File 'lib/zebra/zpl/comment.rb', line 10 def to_zpl "^FX#{data}^FS" end |