Class: WebpackDriver::Asset
- Inherits:
-
Object
- Object
- WebpackDriver::Asset
- Defined in:
- lib/webpack_driver/asset.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#has_source_map ⇒ Object
Returns the value of attribute has_source_map.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Asset
constructor
A new instance of Asset.
Constructor Details
#initialize(attrs) ⇒ Asset
Returns a new instance of Asset.
8 9 10 11 12 |
# File 'lib/webpack_driver/asset.rb', line 8 def initialize(attrs) @id = attrs['id'].to_sym @size = attrs['size'] @file = attrs['file'] end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
5 6 7 |
# File 'lib/webpack_driver/asset.rb', line 5 def file @file end |
#has_source_map ⇒ Object
Returns the value of attribute has_source_map.
6 7 8 |
# File 'lib/webpack_driver/asset.rb', line 6 def has_source_map @has_source_map end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/webpack_driver/asset.rb', line 5 def id @id end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
5 6 7 |
# File 'lib/webpack_driver/asset.rb', line 5 def size @size end |