Class: Array
- Defined in:
- lib/accessibility/bridge/common.rb,
lib/accessibility/bridge/mri.rb
Overview
accessibility-core
extensions to the Array
class
Instance Method Summary collapse
-
#to_point ⇒ CGPoint
Coerce the first two elements of the receiver into a CGPoint.
-
#to_rect ⇒ CGRect
Coerce the first four elements of the receiver into a CGRect.
- #to_ruby ⇒ Object
-
#to_size ⇒ CGSize
Coerce the first two elements of the receiver into a CGSize.
Instance Method Details
#to_point ⇒ CGPoint
Coerce the first two elements of the receiver into a CGPoint
70 71 72 |
# File 'lib/accessibility/bridge/common.rb', line 70 def to_point CGPoint.new self[0], self[1] end |
#to_rect ⇒ CGRect
Coerce the first four elements of the receiver into a CGRect
86 87 88 |
# File 'lib/accessibility/bridge/common.rb', line 86 def to_rect CGRect.new CGPoint.new(self[0], self[1]), CGSize.new(self[2], self[3]) end |
#to_ruby ⇒ Object
190 191 192 |
# File 'lib/accessibility/bridge/mri.rb', line 190 def to_ruby map do |obj| obj.to_ruby end end |