Class: Rocrad::Mixed
Instance Attribute Summary collapse
-
#areas ⇒ Object
Returns the value of attribute areas.
Attributes inherited from Rocrad
Instance Method Summary collapse
- #add_area(x, y, w, h) ⇒ Object
-
#initialize(src = "", options = {}) {|_self| ... } ⇒ Mixed
constructor
A new instance of Mixed.
Methods inherited from Rocrad
Constructor Details
#initialize(src = "", options = {}) {|_self| ... } ⇒ Mixed
Returns a new instance of Mixed.
6 7 8 9 10 |
# File 'lib/rocrad/mixed.rb', line 6 def initialize(src="", = {}) super(src) @areas = .delete(:areas) || [] yield self if block_given? end |
Instance Attribute Details
#areas ⇒ Object
Returns the value of attribute areas.
4 5 6 |
# File 'lib/rocrad/mixed.rb', line 4 def areas @areas end |
Instance Method Details
#add_area(x, y, w, h) ⇒ Object
12 13 14 15 |
# File 'lib/rocrad/mixed.rb', line 12 def add_area(x, y, w, h) @txt = "" @areas << {:x => x, :y => y, :w => w, :h => h} end |