Class: Cat::Style::Mask
- Inherits:
-
Object
- Object
- Cat::Style::Mask
- Defined in:
- lib/cat/style/mask.rb
Instance Method Summary collapse
-
#initialize(size) ⇒ Mask
constructor
A new instance of Mask.
- #to_s ⇒ Object
Constructor Details
#initialize(size) ⇒ Mask
Returns a new instance of Mask.
4 5 6 7 |
# File 'lib/cat/style/mask.rb', line 4 def initialize(size) @size = size @size = "#{@size}%" if @size.is_a?(Integer) end |
Instance Method Details
#to_s ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cat/style/mask.rb', line 9 def to_s %{ position: absolute; width: #{@size}; height: #{@size}; border-radius: 100% 0 0 0; transform-origin: right bottom; background-color: $bgColor; } end |