Class: Vedeu::Cells::Cursor Private
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 Attribute Summary
Attributes inherited from Empty
Instance Method Summary collapse
-
#defaults ⇒ Hash<Symbol => void>
private
private
The default options/attributes for a new instance of this class.
- #null ⇒ NilClass (also: #background, #colour, #foreground, #style) private
- #text ⇒ String private
- #to_ast ⇒ String private
-
#to_h ⇒ Hash<void>
(also: #to_hash)
private
Return an empty hash as most escape sequences won’t make sense as JSON.
-
#to_html(_options = {}) ⇒ String
private
Return an empty string as most escape sequences won’t make sense as HTML.
- #to_s ⇒ String (also: #to_str) private
- #type ⇒ Symbol private
Methods inherited from Empty
#as_html, #border, #eql?, #geometry, #interface, #value?
Methods included from Repositories::Defaults
Methods included from Vedeu::Common
#absent?, #array?, #boolean, #boolean?, #empty_value?, #escape?, #falsy?, #hash?, #line_model?, #numeric?, #positionable?, #present?, #snake_case, #stream_model?, #string?, #symbol?, #truthy?, #view_model?
Methods included from Presentation::Styles
#render_style, #style=, #style?
Methods included from Presentation::Parent
Methods included from Presentation::Position
#position, #position=, #position?, #render_position, #x, #y
Methods included from Presentation::Colour
#background=, #colour=, #colour?, #foreground=, #interface, #named_colour, #named_colour?, #parent_colour, #parent_colour?, #render_colour
Instance Method Details
#defaults ⇒ Hash<Symbol => void> (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.
The default options/attributes for a new instance of this class.
65 66 67 |
# File 'lib/vedeu/cells/cursor.rb', line 65 def defaults super.merge!(position: Vedeu::Geometries::Position.new(1, 1)) end |
#null ⇒ NilClass 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.
15 16 17 |
# File 'lib/vedeu/cells/cursor.rb', line 15 def null nil end |
#text ⇒ 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.
53 54 55 |
# File 'lib/vedeu/cells/cursor.rb', line 53 def text '' end |
#to_ast ⇒ 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.
24 25 26 |
# File 'lib/vedeu/cells/cursor.rb', line 24 def to_ast '' end |
#to_h ⇒ Hash<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.
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.
42 43 44 |
# File 'lib/vedeu/cells/cursor.rb', line 42 def to_html( = {}) '' end |
#to_s ⇒ String 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.
47 48 49 |
# File 'lib/vedeu/cells/cursor.rb', line 47 def to_s "#{position}#{value}" end |
#type ⇒ Symbol
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.
58 59 60 |
# File 'lib/vedeu/cells/cursor.rb', line 58 def type :cursor end |