Class: Rumai::WidgetNode

Inherits:
Node show all
Includes:
WidgetImpl
Defined in:
lib/rumai/wm.rb

Overview

A widget that has a corresponding representation in the IXP file system.

Direct Known Subclasses

Client, View

Instance Attribute Summary

Attributes included from WidgetImpl

#id

Attributes inherited from Node

#path

Instance Method Summary collapse

Methods included from WidgetImpl

#==, #current?

Methods inherited from Node

#[], #children, #clear, #create, #directory?, #each, #each_line, #entries, #exist?, #method_missing, #open, #parent, #read, #remove, #stat, #write

Methods included from ExportInstanceMethods

extended

Constructor Details

#initialize(id, path_prefix) ⇒ WidgetNode

Returns a new instance of WidgetNode.



89
90
91
92
93
94
95
96
97
98
# File 'lib/rumai/wm.rb', line 89

def initialize id, path_prefix
  super "#{path_prefix}/#{id}"

  if id == FOCUSED_WIDGET_ID and ctl.exist?
    @id = ctl.read.split.first
    super "#{path_prefix}/#{@id}"
  else
    @id = id.to_s
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rumai::Node