Class: MirrorMirror::Transformation::Cursor

Inherits:
PropertyTransformation show all
Defined in:
lib/mirror-mirror/transformation/cursor.rb

Instance Method Summary collapse

Methods inherited from PropertyTransformation

instances, #transform_expression, #transform_expression?, #transform_name, #transform_name?

Methods inherited from Base

inherited, instances

Instance Method Details

#transform_value(name, value) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/mirror-mirror/transformation/cursor.rb', line 7

def transform_value(name, value)
  if value =~ /(n|s)?(e|w)-resize/
    "#{$1}#{$2 == "e" ? "w" : "e"}-resize"
  else
    value
  end
end

#transform_value?(name) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/mirror-mirror/transformation/cursor.rb', line 3

def transform_value?(name)
  name == "cursor"
end