Class: Machined::Index
- Inherits:
-
Sprockets::Index
- Object
- Sprockets::Index
- Machined::Index
- Defined in:
- lib/machined/index.rb
Overview
We need to add accessors for the Machined environment and the Sprocket’s config to the index, so the Context has access.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
A reference to the configuration.
-
#machined ⇒ Object
readonly
A reference to the Machined environment which created this instance.
Instance Method Summary collapse
-
#initialize(environment) ⇒ Index
constructor
A new instance of Index.
Constructor Details
#initialize(environment) ⇒ Index
Returns a new instance of Index.
16 17 18 19 20 21 |
# File 'lib/machined/index.rb', line 16 def initialize(environment) @machined = environment.machined @config = environment.config super end |
Instance Attribute Details
#config ⇒ Object (readonly)
A reference to the configuration.
13 14 15 |
# File 'lib/machined/index.rb', line 13 def config @config end |
#machined ⇒ Object (readonly)
A reference to the Machined environment which created this instance.
10 11 12 |
# File 'lib/machined/index.rb', line 10 def machined @machined end |