Class: Intersys::Reflection::ClassDefinition
- Defined in:
- lib/intersys.rb
Overview
This class is basic reflection class If has class method Open(class_name), that creates instance of this class, representing its internals
Usually creates via Intersys::Object.reflector
Then it is possible to call such methods as _methods, properties to get access to methods and properties of Cache class
Instance Method Summary collapse
-
#_methods ⇒ Object
short alias to intersys_get(“Methods”).
- #all_methods ⇒ Object
- #properties ⇒ Object
-
#save ⇒ Object
After all changes to class definition required to call save.
Methods inherited from Object
#class_name, class_name, common_get_or_set, concurrency, #database, database, delete_all, #destroy, #id, inherited, intersys_description, lookup, prefix, timeout, transaction
Methods included from Callable
#intersys_call, #intersys_get, #intersys_has_method?, #intersys_has_property?, #intersys_method, #intersys_methods, #intersys_properties, #intersys_property, #intersys_reflector, #intersys_set, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Intersys::Callable
Instance Method Details
#_methods ⇒ Object
short alias to intersys_get(“Methods”)
342 343 344 |
# File 'lib/intersys.rb', line 342 def _methods @methods ||= intersys_get("Methods") end |
#all_methods ⇒ Object
350 351 352 353 354 355 356 357 358 |
# File 'lib/intersys.rb', line 350 def all_methods _methods.to_a + self.super.split(",").map do |klass| klass = klass.strip if match_data = klass.match(/^%([^\.]+)$/) klass = "%Library.#{match_data.captures.first}" end self.class.open(klass).all_methods end.flatten end |
#properties ⇒ Object
346 347 348 |
# File 'lib/intersys.rb', line 346 def properties @properties ||= intersys_get("Properties") end |
#save ⇒ Object
After all changes to class definition required to call save
337 338 339 |
# File 'lib/intersys.rb', line 337 def save intersys_call("%Save") end |