Method: Browser::CSS::Unit#*
- Defined in:
- opal/browser/css/unit.rb
#*(other) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 |
# File 'opal/browser/css/unit.rb', line 61 def *(other) return Unit.new(@number * other, @type) unless Unit === other if @type == other.type Unit.new(@number * other.to_f, @type) elsif compatible?(self) and compatible?(other) Unit.new(@number * convert(other, @type), @type) else raise ArgumentError, "#{other.type} isn't compatible with #{@type}" end end |