Class: Machined::Index

Inherits:
Sprockets::Index
  • Object
show all
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

Instance Method Summary collapse

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

#configObject (readonly)

A reference to the configuration.



13
14
15
# File 'lib/machined/index.rb', line 13

def config
  @config
end

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