Class: Klenod::Build::LoadedModule
- Inherits:
-
Object
- Object
- Klenod::Build::LoadedModule
- Defined in:
- lib/klenod/build/loaded_module.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #assets(type: nil, content_type: nil, recursive: true) ⇒ Object
- #call ⇒ Object
- #evaluated? ⇒ Boolean
- #exports ⇒ Object
-
#initialize(context, id) ⇒ LoadedModule
constructor
A new instance of LoadedModule.
- #record ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(context, id) ⇒ LoadedModule
Returns a new instance of LoadedModule.
8 9 10 11 |
# File 'lib/klenod/build/loaded_module.rb', line 8 def initialize(context, id) @context = context @id = id end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/klenod/build/loaded_module.rb', line 6 def context @context end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/klenod/build/loaded_module.rb', line 6 def id @id end |
Instance Method Details
#assets(type: nil, content_type: nil, recursive: true) ⇒ Object
29 30 31 |
# File 'lib/klenod/build/loaded_module.rb', line 29 def assets(type: nil, content_type: nil, recursive: true) context.assets_for_module(id, type: type, content_type: content_type, recursive: recursive) end |
#call ⇒ Object
25 26 27 |
# File 'lib/klenod/build/loaded_module.rb', line 25 def call(...) exports.call(...) end |
#evaluated? ⇒ Boolean
21 22 23 |
# File 'lib/klenod/build/loaded_module.rb', line 21 def evaluated? context.evaluated?(id) end |
#exports ⇒ Object
17 18 19 |
# File 'lib/klenod/build/loaded_module.rb', line 17 def exports context.exports(id) end |
#record ⇒ Object
13 14 15 |
# File 'lib/klenod/build/loaded_module.rb', line 13 def record context.graph.records.fetch(id) end |
#to_s ⇒ Object
33 34 35 |
# File 'lib/klenod/build/loaded_module.rb', line 33 def to_s id.to_s end |