Class: Klenod::Runtime::AssetSpec

Inherits:
Data
  • Object
show all
Defined in:
lib/klenod/runtime/bundle.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logical_name = nil, content_hash = nil, output_path = nil, content_type = nil, metadata = nil, url = nil, **keywords) ⇒ AssetSpec

Returns a new instance of AssetSpec.



15
16
17
18
19
20
21
22
23
24
# File 'lib/klenod/runtime/bundle.rb', line 15

def initialize(logical_name = nil, content_hash = nil, output_path = nil, content_type = nil,  = nil, url = nil, **keywords)
  logical_name = keywords.fetch(:logical_name, logical_name)
  content_hash = keywords.fetch(:content_hash, content_hash)
  output_path = keywords.fetch(:output_path, output_path)
  content_type = keywords.fetch(:content_type, content_type)
   = keywords.fetch(:metadata, )
  url = keywords.fetch(:url, url)
  url ||= output_path
  super(logical_name:, content_hash:, output_path:, content_type:, metadata:, url:)
end

Instance Attribute Details

#content_hash ⇒ Object (readonly)

Returns the value of attribute content_hash

Returns:

  • (Object) —

    the current value of content_hash



13
14
15
# File 'lib/klenod/runtime/bundle.rb', line 13

def content_hash
  @content_hash
end

#content_type ⇒ Object (readonly)

Returns the value of attribute content_type

Returns:

  • (Object) —

    the current value of content_type



13
14
15
# File 'lib/klenod/runtime/bundle.rb', line 13

def content_type
  @content_type
end

#logical_name ⇒ Object (readonly)

Returns the value of attribute logical_name

Returns:

  • (Object) —

    the current value of logical_name



13
14
15
# File 'lib/klenod/runtime/bundle.rb', line 13

def logical_name
  @logical_name
end

#metadata ⇒ Object (readonly)

Returns the value of attribute metadata

Returns:

  • (Object) —

    the current value of metadata



13
14
15
# File 'lib/klenod/runtime/bundle.rb', line 13

def 
  @metadata
end

#output_path ⇒ Object (readonly)

Returns the value of attribute output_path

Returns:

  • (Object) —

    the current value of output_path



13
14
15
# File 'lib/klenod/runtime/bundle.rb', line 13

def output_path
  @output_path
end

#url ⇒ Object (readonly)

Returns the value of attribute url

Returns:

  • (Object) —

    the current value of url



13
14
15
# File 'lib/klenod/runtime/bundle.rb', line 13

def url
  @url
end