Class: Cat::Style::Mask

Inherits:
Object
  • Object
show all
Defined in:
lib/cat/style/mask.rb

Instance Method Summary collapse

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_sObject



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