Module: Vedeu::DSL::Cursors

Included in:
Cursors::DSL, Views, Interfaces::DSL, Views::View::DSL
Defined in:
lib/vedeu/dsl/cursors.rb

Overview

Provides DSL methods for Vedeu::Cursors::Cursor objects.

Instance Method Summary collapse

Instance Method Details

#cursor(value = true) ⇒ Vedeu::Cursors::Cursor

Set the cursor visibility on an interface.

Parameters:

  • value (Boolean) (defaults to: true)

    Any value other than nil or false will evaluate to true.

Returns:



18
19
20
21
22
23
# File 'lib/vedeu/dsl/cursors.rb', line 18

def cursor(value = true)
  model.cursor_visible = Vedeu::Boolean.coerce(value)

  Vedeu::Cursors::Cursor.store(name:    name,
                               visible: Vedeu::Boolean.coerce(value))
end

#cursor!Vedeu::Cursors::Cursor Also known as: show_cursor!

Set the cursor to visible for the interface or view.



28
29
30
# File 'lib/vedeu/dsl/cursors.rb', line 28

def cursor!
  cursor(true)
end

#no_cursor!Vedeu::Cursors::Cursor Also known as: hide_cursor!

Set the cursor to invisible for the interface or view.



36
37
38
# File 'lib/vedeu/dsl/cursors.rb', line 36

def no_cursor!
  cursor(false)
end