Class: Yap::World::Addons::RcFile
- Inherits:
-
Yap::World::Addon
- Object
- Yap::World::Addon
- Yap::World::Addons::RcFile
- Defined in:
- lib/yap/world/addons.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
-
#initialize(file) ⇒ RcFile
constructor
A new instance of RcFile.
- #initialize_world(world) ⇒ Object
Methods included from Yap::World::AddonMethods::ClassMethods
#addon_name, #debug_log, #load_addon, #require
Methods included from Yap::World::AddonMethods::InstanceMethods
Constructor Details
#initialize(file) ⇒ RcFile
Returns a new instance of RcFile.
100 101 102 |
# File 'lib/yap/world/addons.rb', line 100 def initialize(file) @file = file end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
98 99 100 |
# File 'lib/yap/world/addons.rb', line 98 def file @file end |
Instance Method Details
#initialize_world(world) ⇒ Object
104 105 106 107 |
# File 'lib/yap/world/addons.rb', line 104 def initialize_world(world) Treefell['shell'].puts "initializing rcfile: #{file}" world.instance_eval File.read(@file) end |