Class: Mud::InstalledModule
- Defined in:
- lib/mud/installed_module.rb
Instance Attribute Summary collapse
-
#modified ⇒ Object
readonly
Returns the value of attribute modified.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from Module
#context, #dependencies, #name
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(path, context) ⇒ InstalledModule
constructor
A new instance of InstalledModule.
Methods inherited from Module
#==, #depends_on?, parse_name, #resolvable?, #to_s, #unresolvable_dependencies
Constructor Details
#initialize(path, context) ⇒ InstalledModule
Returns a new instance of InstalledModule.
6 7 8 9 10 11 12 |
# File 'lib/mud/installed_module.rb', line 6 def initialize(path, context) super(path, File.open(path) { |f| f.read }, context) @content = nil @path = path @modified = File.mtime(path) end |
Instance Attribute Details
#modified ⇒ Object (readonly)
Returns the value of attribute modified.
4 5 6 |
# File 'lib/mud/installed_module.rb', line 4 def modified @modified end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/mud/installed_module.rb', line 4 def path @path end |
Instance Method Details
#content ⇒ Object
14 15 16 |
# File 'lib/mud/installed_module.rb', line 14 def content File.open(@path) { |f| f.read } end |