Class: Alchemy::EssenceTextSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/alchemy/essence_text_serializer.rb

Instance Method Summary collapse

Instance Method Details



11
12
13
14
15
16
17
18
19
# File 'app/serializers/alchemy/essence_text_serializer.rb', line 11

def link
  return if object.link.blank?
  {
    url: object.link,
    title: object.link_title,
    css_class: object.link_class_name,
    target: object.link_target
  }
end