Module: GmailBritta::SingleWriteAccessors

Extended by:
ClassMethods
Included in:
Filter
Defined in:
lib/gmail-britta/single_write_accessors.rb

Overview

This mixin defines a simple convenience methods for creating accessors that can only be written to once for each instance.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.single_write_accessor(name, gmail_name, &block) ⇒ Object Originally defined in module ClassMethods

Defines a string-typed filter accessor DSL method. Generates the [name], get_[name] and output_[name] methods.

Parameters:

  • name (Symbol)

    the name of the accessor method

  • gmail_name (String)

    the name of the attribute in the gmail Atom export

.single_write_accessorsArray<Symbol> Originally defined in module ClassMethods

Returns the single write accessors defined on this class and every superclass.

Returns:

  • (Array<Symbol>)

    the single write accessors defined on this class and every superclass.

.single_write_boolean_accessor(name, gmail_name) ⇒ Object Originally defined in module ClassMethods

Note:

There is no way to turn these boolean values back off in Gmail's export XML.

Defines a boolean-typed filter accessor DSL method. If the method gets called in the filter definition block, that causes the value to switch to true.

Parameters:

  • name (Symbol)

    the name of the accessor method

  • gmail_name (String)

    the name of the attribute in the gmail Atom export