Class: Confinement::Config::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/confinement.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root:) {|_self| ... } ⇒ Source

Returns a new instance of Source.

Yields:

  • (_self)

Yield Parameters:



207
208
209
210
# File 'lib/confinement.rb', line 207

def initialize(root:)
  @root = root
  yield(self)
end

Instance Attribute Details

#assetsObject

Returns the value of attribute assets.



212
213
214
# File 'lib/confinement.rb', line 212

def assets
  @assets
end

#contentsObject

Returns the value of attribute contents.



213
214
215
# File 'lib/confinement.rb', line 213

def contents
  @contents
end

#layoutsObject

Returns the value of attribute layouts.



214
215
216
# File 'lib/confinement.rb', line 214

def layouts
  @layouts
end

Instance Method Details

#assets_pathObject



216
217
218
# File 'lib/confinement.rb', line 216

def assets_path
  @root.concat(assets).cleanpath.expand_path
end

#contents_pathObject



220
221
222
# File 'lib/confinement.rb', line 220

def contents_path
  @root.concat(contents).cleanpath.expand_path
end

#layouts_pathObject



224
225
226
# File 'lib/confinement.rb', line 224

def layouts_path
  @root.concat(layouts).cleanpath.expand_path
end