class SublimeDSL::SublimeText::Mouse::Click

A mouse click: button + modifiers.

Attributes

button[R]
modifiers[R]

Public Class Methods

new(modifiers, button) click to toggle source
# File lib/sublime_dsl/sublime_text/mouse.rb, line 127
def initialize(modifiers, button)
  @modifiers = modifiers
  @button = button
end

Public Instance Methods

to_h() click to toggle source
# File lib/sublime_dsl/sublime_text/mouse.rb, line 138
def to_h
  h = { 'button' => button.st_name }
  h['modifiers'] = modifiers.map(&:st_name) unless modifiers.empty?
  h
end
to_s()
Alias for: to_spec
to_spec() click to toggle source
# File lib/sublime_dsl/sublime_text/mouse.rb, line 132
def to_spec
  [*modifiers.map(&:name), button.name].join('+')
end
Also aliased as: to_s