Sha256: f2a664fdbe1916d351363aace3cc16432e76aaa74ccec70788186763b7df25b2

Contents?: true

Size: 684 Bytes

Versions: 13

Compression:

Stored size: 684 Bytes

Contents

class Module
  
  
  
  
  
  def resource_exist? resource_name		
    self_ancestors_and_namespaces do |klass|
      return true if RubyExt::Resource.resource_exist? klass, resource_name					
    end
    return false		
  end
  
  def [] resource_name
    self_ancestors_and_namespaces do |klass|
      if RubyExt::Resource.resource_exist? klass, resource_name
        return RubyExt::Resource.resource_get(klass, resource_name)
      end	
    end
    raise RubyExt::Resource::NotExist, "Resource '#{resource_name}' for Class '#{self.name}' doesn't exist!", caller
  end
  
  def []= resource_name, value
    RubyExt::Resource.resource_set self.name, resource_name, value
  end    
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ruby-ext-0.2.16 old/lib/RubyExt/module.rb
ruby-ext-0.2.15 old/lib/RubyExt/module.rb
ruby-ext-0.2.13 old/lib/RubyExt/module.rb
ruby-ext-0.2.12 old/lib/RubyExt/module.rb
ruby-ext-0.2.11 old/lib/RubyExt/module.rb
ruby-ext-0.2.10 old/lib/RubyExt/module.rb
ruby-ext-0.2.9 old/lib/RubyExt/module.rb
ruby-ext-0.2.8 old/lib/RubyExt/module.rb
ruby-ext-0.2.7 old/lib/RubyExt/module.rb
ruby-ext-0.2.6 old/lib/RubyExt/module.rb
ruby-ext-0.2.5 old/lib/RubyExt/module.rb
ruby-ext-0.2.4 old/lib/RubyExt/module.rb
ruby-ext-0.2.3 old/lib/RubyExt/module.rb