Method: AX::Element#set
- Defined in:
- lib/ax/element.rb
#set(attr, value) ⇒ Object
Set a writable attribute on the element to the given value.
155 156 157 158 159 160 161 |
# File 'lib/ax/element.rb', line 155 def set attr, value unless writable? attr raise ArgumentError, "#{attr} is read-only for #{inspect}" end value = value.relative_to(@ref.value.size) if value.kind_of? Range @ref.set TRANSLATOR.cocoaify(attr), value end |