Class: Yap::World::Addons::RcFile

Inherits:
Yap::World::Addon show all
Defined in:
lib/yap/world/addons.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Yap::World::AddonMethods::ClassMethods

#addon_name, #debug_log, #load_addon, #require

Methods included from Yap::World::AddonMethods::InstanceMethods

#addon_name, #debug_log

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

#fileObject (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