Class: Rumai::WidgetNode
- Object
- Rumai::Node
- Rumai::WidgetNode
Included Modules
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 |