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

Constructor Details

- (WidgetNode) initialize(id, path_prefix)

A new instance of WidgetNode



105
106
107
108
109
110
111
112
113
114
# File 'lib/rumai/wm.rb', line 105

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