Module: Zebra::Epl::Printable
Defined Under Namespace
Classes: MissingAttributeError
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#position ⇒ Object
Returns the value of attribute position.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
11 12 13 |
# File 'lib/zebra/epl/printable.rb', line 11 def data @data end |
#position ⇒ Object
Returns the value of attribute position.
10 11 12 |
# File 'lib/zebra/epl/printable.rb', line 10 def position @position end |
#x ⇒ Object (readonly)
Returns the value of attribute x.
10 11 12 |
# File 'lib/zebra/epl/printable.rb', line 10 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
10 11 12 |
# File 'lib/zebra/epl/printable.rb', line 10 def y @y end |
Instance Method Details
#initialize(options = {}) ⇒ Object
13 14 15 |
# File 'lib/zebra/epl/printable.rb', line 13 def initialize( = {}) .each_pair { |attribute, value| self.__send__ "#{attribute}=", value } end |
#rotation ⇒ Object
26 27 28 |
# File 'lib/zebra/epl/printable.rb', line 26 def rotation @rotation || Rotation::NO_ROTATION end |
#rotation=(rot) ⇒ Object
21 22 23 24 |
# File 'lib/zebra/epl/printable.rb', line 21 def rotation=(rot) Rotation.validate_rotation rot @rotation = rot end |