org.emailscript.api

Helper

class Helper extends AnyRef

Useful utilities

Features

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Helper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Helper(scope: Bindings)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def daysAgo(days: Int): Date

    What was the date x days ago?

    What was the date x days ago?

    days
    returns

    java.sql.Date (because the Java 8 date is not yet commonly used)

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def execute(templateName: String, data: AnyRef): String

    You can do text formatting using mustache templates

    You can do text formatting using mustache templates

    templateName

    filename of mustache template

    data

    data to feed into template

    returns

    formatted result

    See also

    http://mustache.github.io/mustache.5.html

  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def formatNumber(number: Double, format: String): String

    Format a number using a format string

    Format a number using a format string

    number

    number to format

    format

    format to use for example ###,###

    returns

    formatted text returned from running the mustache template

    See also

    http://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def monthsAgo(months: Int): Date

    What was the date x months ago?

    What was the date x months ago?

    months
    returns

    java.sql.Date ((because the Java 8 date is not yet commonly used)

  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def requires(params: Collection[String]): Unit

    Check to see if the specified parameters are supplied to this script.

    Check to see if the specified parameters are supplied to this script. If not, halts execution and prints an appropriate error message

    params

    list of parameters that are expected

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toBytes(number: Long): String

    Takes a number and returns it formatted in KB,MB,GB etc.

    Takes a number and returns it formatted in KB,MB,GB etc.

    number

  24. def toPercent(number: Double): String

  25. def toPercent(numerator: Long, denominator: Long): String

    Takes two numbers and returns what percent the numerator is of the denominator as a formatted string.

    Takes two numbers and returns what percent the numerator is of the denominator as a formatted string.

    Ex. toPercent(3,9) == "33.33%" toPercent(2,4) == "50%" toPercent(100,50) == "200%"

  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def weeksAgo(weeks: Int): Date

    What was date x weeks ago?

    What was date x weeks ago?

    weeks
    returns

    java.sql.Date (because the Java 8 date is not yet commonly used)

Inherited from AnyRef

Inherited from Any

Ungrouped