fe2c1c6eb6 | ||
---|---|---|
.. | ||
readme.md |
readme.md
Lösung: Eigenclass einer Klasse
puts Numeric::to_binary(47)
Alternative Lösung:
```ruby
class << Numeric
def to_binary(n)
n.to_s(2)
end
end
puts Numeric::to_binary(47)