Class: OsCtld::Assets::Definition::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/osctld/assets/definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeScope

Returns a new instance of Scope.



9
10
11
# File 'lib/osctld/assets/definition.rb', line 9

def initialize
  @assets = []
end

Instance Attribute Details

#assetsObject (readonly)

Returns the value of attribute assets.



7
8
9
# File 'lib/osctld/assets/definition.rb', line 7

def assets
  @assets
end

Instance Method Details

#asset(type, path, opts = {}) ⇒ Object



13
14
15
# File 'lib/osctld/assets/definition.rb', line 13

def asset(type, path, opts = {}, &)
  @assets << Assets.for_type(type).new(path, opts, &)
end