module Cura::Attributes::HasFocusability

Adds the `focusable` attribute to objects.

Public Class Methods

new(attributes={}) click to toggle source
Calls superclass method Cura::Attributes::HasAttributes::new
# File lib/cura/attributes/has_focusability.rb, line 9
def initialize(attributes={})
  @focusable = false unless instance_variable_defined?(:@focusable)

  super
end

Public Instance Methods

focusable=(value) click to toggle source

Set whether this object is focusable or not.

@param [Object] value @return [Boolean]

# File lib/cura/attributes/has_focusability.rb, line 26
def focusable=(value)
  @focusable = !!value
end
focusable?() click to toggle source

Get whether this object is focusable or not.

@return [Boolean]

# File lib/cura/attributes/has_focusability.rb, line 18
def focusable?
  @focusable
end