Class: Vedeu::Cells::Cursor Private

Inherits:
Empty
  • Object
show all
Defined in:
lib/vedeu/cells/cursor.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Provides the position and visibility escape sequence for a Vedeu::Cursors::Cursor

Instance Method Summary collapse

Instance Method Details

#cell?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



15
16
17
# File 'lib/vedeu/cells/cursor.rb', line 15

def cell?
  false
end

#defaultsHash (private)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Hash)


60
61
62
# File 'lib/vedeu/cells/cursor.rb', line 60

def defaults
  super.merge!(position: [1, 1])
end

#nullNilClass Also known as: background, colour, foreground, style

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (NilClass)


20
21
22
# File 'lib/vedeu/cells/cursor.rb', line 20

def null
  nil
end

#to_hHash<void> Also known as: to_hash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return an empty hash as most escape sequences won’t make sense as JSON.

Returns:

  • (Hash<void>)


32
33
34
# File 'lib/vedeu/cells/cursor.rb', line 32

def to_h
  {}.merge!(position.to_h).merge!(value: value)
end

#to_html(_options = {}) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return an empty string as most escape sequences won’t make sense as HTML.

Parameters:

  • _options (Hash) (defaults to: {})

    Ignored.

Returns:

  • (String)


42
43
44
# File 'lib/vedeu/cells/cursor.rb', line 42

def to_html(_options = {})
  ''
end

#to_sString Also known as: to_str

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)


47
48
49
# File 'lib/vedeu/cells/cursor.rb', line 47

def to_s
  "#{position}#{value}"
end

#typeSymbol

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Symbol)


53
54
55
# File 'lib/vedeu/cells/cursor.rb', line 53

def type
  :cursor
end