Class: Studio::EmailCatalog::Entry

Inherits:
Struct
  • Object
show all
Defined in:
app/services/studio/email_catalog.rb

Overview

A registered email. default_asset — logical asset path inside the gem (resolved through the host's pipeline); nil means no inherited artwork. type — :transactional or :marketing. preview — callable returning a Mail, or nil.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#default_assetObject

Returns the value of attribute default_asset

Returns:

  • (Object)

    the current value of default_asset



76
77
78
# File 'app/services/studio/email_catalog.rb', line 76

def default_asset
  @default_asset
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



76
77
78
# File 'app/services/studio/email_catalog.rb', line 76

def description
  @description
end

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



76
77
78
# File 'app/services/studio/email_catalog.rb', line 76

def key
  @key
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



76
77
78
# File 'app/services/studio/email_catalog.rb', line 76

def label
  @label
end

#previewObject

Returns the value of attribute preview

Returns:

  • (Object)

    the current value of preview



76
77
78
# File 'app/services/studio/email_catalog.rb', line 76

def preview
  @preview
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



76
77
78
# File 'app/services/studio/email_catalog.rb', line 76

def type
  @type
end

Instance Method Details

#marketing?Boolean

nil-safe: an Entry built directly (the STANDARD seed) may carry no type.

Returns:

  • (Boolean)


81
# File 'app/services/studio/email_catalog.rb', line 81

def marketing? = type.to_s == "marketing"

#previewable?Boolean

Returns:

  • (Boolean)


79
80
# File 'app/services/studio/email_catalog.rb', line 79

def previewable? = preview.respond_to?(:call)
# nil-safe: an Entry built directly (the STANDARD seed) may carry no type.

#to_sObject



78
# File 'app/services/studio/email_catalog.rb', line 78

def to_s = key