Class: Rumai::WidgetNode

Included Modules

Rumai::WidgetImpl

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

Constructor Summary

public initialize(aId, aPathPrefix)
[View source]


140
141
142
143
144
145
146
147
148
149
# File 'lib/rumai/wm.rb', line 140

def initialize aId, aPathPrefix
  super "#{aPathPrefix}/#{aId}"

  if aId.to_s == 'sel' and ctl.exist?
    @id = ctl.read.split.first
    @path = File.join(File.dirname(@path), @id)
  else
    @id = File.basename(@path)
  end
end

Dynamic Method Handling

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

public method_missing(aMeth, *aArgs)

Provides access to child nodes through method calls.

:call-seq: node.child -> Node

[View source]


130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/rumai/fs.rb', line 130

def method_missing aMeth, *aArgs
  child = self[aMeth]

  # speed up future accesses
  (class << self; self; end).instance_eval do
    define_method aMeth do
      child
    end
  end

  child
end

Public Visibility

Public Instance Methods Inherited from Rumai::Node

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

Public Instance Methods Included from Rumai::WidgetImpl

==, current?