Class: OpenAssets::Protocol::AssetDefinitionLoader
- Inherits:
-
Object
- Object
- OpenAssets::Protocol::AssetDefinitionLoader
- Defined in:
- lib/openassets/protocol/asset_definition_loader.rb
Instance Attribute Summary collapse
-
#loader ⇒ Object
readonly
Returns the value of attribute loader.
Instance Method Summary collapse
-
#initialize(metadata) ⇒ AssetDefinitionLoader
constructor
A new instance of AssetDefinitionLoader.
-
#load_definition ⇒ Object
load Asset Definition File @return loaded asset definition object.
Constructor Details
#initialize(metadata) ⇒ AssetDefinitionLoader
Returns a new instance of AssetDefinitionLoader.
8 9 10 11 12 |
# File 'lib/openassets/protocol/asset_definition_loader.rb', line 8 def initialize() if .start_with?('http://') || .start_with?('https://') @loader = HttpAssetDefinitionLoader.new() end end |
Instance Attribute Details
#loader ⇒ Object (readonly)
Returns the value of attribute loader.
6 7 8 |
# File 'lib/openassets/protocol/asset_definition_loader.rb', line 6 def loader @loader end |
Instance Method Details
#load_definition ⇒ Object
load Asset Definition File @return loaded asset definition object
16 17 18 |
# File 'lib/openassets/protocol/asset_definition_loader.rb', line 16 def load_definition @loader.load if @loader end |