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 Method Summary

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



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