Class: ContentfulLite::Asset
- Inherits:
-
Object
- Object
- ContentfulLite::Asset
- Includes:
- CommonData
- Defined in:
- lib/contentful_lite/asset.rb
Instance Attribute Summary
Attributes included from CommonData
#created_at, #default_locale, #environment_id, #id, #locales, #localized_fields, #retrieved_at, #revision, #space_id, #sys, #updated_at
Instance Method Summary collapse
-
#content_type ⇒ Object
Returns the content_type attribute of the Contentful Asset.
-
#contentful_link ⇒ String
Gets the URL to view/edit the entry on Contentful webapp.
-
#description ⇒ Object
Returns the description attribute of the Contentful Asset.
-
#file_details ⇒ Object
Returns the file_details attribute of the Contentful Asset.
-
#file_name ⇒ Object
Returns the file_name attribute of the Contentful Asset.
-
#title ⇒ Object
Returns the title attribute of the Contentful Asset.
-
#url ⇒ Object
Returns the url attribute of the Contentful Asset.
Methods included from CommonData
#as_json, #fields, #initialize, #locale, #locale=, #to_link, #with_locale
Instance Method Details
#content_type ⇒ Object
Returns the content_type attribute of the Contentful Asset
26 |
# File 'lib/contentful_lite/asset.rb', line 26 asset_attribute :content_type, ['file', 'contentType'] |
#contentful_link ⇒ String
Gets the URL to view/edit the entry on Contentful webapp
9 10 11 |
# File 'lib/contentful_lite/asset.rb', line 9 def contentful_link "https://app.contentful.com/spaces/#{space_id}/assets/#{id}" end |
#description ⇒ Object
Returns the description attribute of the Contentful Asset
24 |
# File 'lib/contentful_lite/asset.rb', line 24 asset_attribute :description, ['description'], default: '' |
#file_details ⇒ Object
Returns the file_details attribute of the Contentful Asset
28 |
# File 'lib/contentful_lite/asset.rb', line 28 asset_attribute :file_details, ['file', 'details'] |
#file_name ⇒ Object
Returns the file_name attribute of the Contentful Asset
25 |
# File 'lib/contentful_lite/asset.rb', line 25 asset_attribute :file_name, ['file', 'fileName'] |
#title ⇒ Object
Returns the title attribute of the Contentful Asset
23 |
# File 'lib/contentful_lite/asset.rb', line 23 asset_attribute :title, ['title'] |
#url ⇒ Object
Returns the url attribute of the Contentful Asset
27 |
# File 'lib/contentful_lite/asset.rb', line 27 asset_attribute :url, ['file', 'url'] |