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