Class: RubyArena::ClassLoader
- Inherits:
-
Object
- Object
- RubyArena::ClassLoader
- Defined in:
- lib/ruby_arena/class_loader.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
- #get_class ⇒ Object
-
#initialize(filename) ⇒ ClassLoader
constructor
A new instance of ClassLoader.
Constructor Details
#initialize(filename) ⇒ ClassLoader
Returns a new instance of ClassLoader.
5 6 7 8 |
# File 'lib/ruby_arena/class_loader.rb', line 5 def initialize(filename) @filename = filename require filename end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
3 4 5 |
# File 'lib/ruby_arena/class_loader.rb', line 3 def filename @filename end |
Instance Method Details
#get_class ⇒ Object
10 11 12 |
# File 'lib/ruby_arena/class_loader.rb', line 10 def get_class Object.const_get(class_name) end |