Class: State

Inherits:
Object
  • Object
show all
Defined in:
lib/vimamsa/key_binding_tree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key_name, eval_rule = "", ctype = :command, scope: :buffer) ⇒ State

Returns a new instance of State.



28
29
30
31
32
33
34
35
36
37
# File 'lib/vimamsa/key_binding_tree.rb', line 28

def initialize(key_name, eval_rule = "", ctype = :command, scope: :buffer)
  @key_name = key_name
  @eval_rule = eval_rule
  @children = []
  @scope = scope
  @major_modes = []
  @action = nil
  @level = 0
  @cursor_type = ctype
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



25
26
27
# File 'lib/vimamsa/key_binding_tree.rb', line 25

def action
  @action
end

#childrenObject

Returns the value of attribute children.



25
26
27
# File 'lib/vimamsa/key_binding_tree.rb', line 25

def children
  @children
end

#cur_modeObject (readonly)

Returns the value of attribute cur_mode.



26
27
28
# File 'lib/vimamsa/key_binding_tree.rb', line 26

def cur_mode
  @cur_mode
end

#cursor_typeObject

Returns the value of attribute cursor_type.



25
26
27
# File 'lib/vimamsa/key_binding_tree.rb', line 25

def cursor_type
  @cursor_type
end

#eval_ruleObject

Returns the value of attribute eval_rule.



25
26
27
# File 'lib/vimamsa/key_binding_tree.rb', line 25

def eval_rule
  @eval_rule
end

#key_nameObject

Returns the value of attribute key_name.



25
26
27
# File 'lib/vimamsa/key_binding_tree.rb', line 25

def key_name
  @key_name
end

#labelObject

Returns the value of attribute label.



25
26
27
# File 'lib/vimamsa/key_binding_tree.rb', line 25

def label
  @label
end

#levelObject

Returns the value of attribute level.



25
26
27
# File 'lib/vimamsa/key_binding_tree.rb', line 25

def level
  @level
end

#major_modesObject

Returns the value of attribute major_modes.



25
26
27
# File 'lib/vimamsa/key_binding_tree.rb', line 25

def major_modes
  @major_modes
end

#scopeObject (readonly)

Returns the value of attribute scope.



26
27
28
# File 'lib/vimamsa/key_binding_tree.rb', line 26

def scope
  @scope
end

Instance Method Details

#to_sObject



39
40
41
# File 'lib/vimamsa/key_binding_tree.rb', line 39

def to_s()
  return @key_name
end