Class: Effective::Snippets::EffectiveAsset

Inherits:
Snippet
  • Object
show all
Defined in:
app/models/effective/snippets/effective_asset.rb

Instance Method Summary collapse

Instance Method Details

#assetObject



10
11
12
# File 'app/models/effective/snippets/effective_asset.rb', line 10

def asset
  @asset ||= (Effective::Asset.where(:id => asset_id).first if asset_id)
end

#is_private?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/models/effective/snippets/effective_asset.rb', line 18

def is_private?
  private_url == true || (asset.try(:aws_acl) == 'authenticated-read')
end

#snippet_tagObject



14
15
16
# File 'app/models/effective/snippets/effective_asset.rb', line 14

def snippet_tag
  :span
end