Class: Trackman::Assets::RemoteAsset
- Extended by:
- RemoteAssetFactory
- Includes:
- Persistence::Remote
- Defined in:
- lib/trackman/assets/remote_asset.rb
Defined Under Namespace
Classes: AssetIO
Constant Summary
Constants included from Components::Conventions
Components::Conventions::Asset
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Attributes inherited from Asset
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(attributes = {}) ⇒ RemoteAsset
constructor
A new instance of RemoteAsset.
- #validate_path? ⇒ Boolean
Methods included from RemoteAssetFactory
Methods included from AssetFactory
#add_content_behavior, #asset_pipeline_enabled?, #create, #rails_defined?, #retrieve_parent
Methods included from Persistence::Remote
#delete, included, #insert, #update
Methods inherited from Asset
#<=>, all, autosync, #is_child_of, sync, #to_remote, #to_s
Methods included from Components::Conventions
#error_page, #error_path, #maintenance_page, #maintenance_path
Methods included from Components::Shippable
Methods included from Components::Diffable
Constructor Details
#initialize(attributes = {}) ⇒ RemoteAsset
Returns a new instance of RemoteAsset.
12 13 14 15 16 17 18 |
# File 'lib/trackman/assets/remote_asset.rb', line 12 def initialize attributes = {} ensure_config super @id = attributes[:id] @file_hash = attributes[:file_hash] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/trackman/assets/remote_asset.rb', line 10 def id @id end |
Instance Method Details
#==(other) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/trackman/assets/remote_asset.rb', line 24 def ==(other) result = super if result if other.is_a? RemoteAsset result = other.id == id && other.file_hash == file_hash end end result end |
#validate_path? ⇒ Boolean
20 21 22 |
# File 'lib/trackman/assets/remote_asset.rb', line 20 def validate_path? false end |