Class: Cliqr::Config::Event Private

Inherits:
Base
  • Object
show all
Defined in:
lib/cliqr/config/event.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

The configuration setting which defines a event

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#set_config, #skip_validation?

Methods included from Validation

#errors, included, #read_attributes, #valid?, #validate, #validations

Methods included from DSL

included

Constructor Details

#initializeEvent

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

New config instance with all attributes set as UNSET



27
28
29
30
# File 'lib/cliqr/config/event.rb', line 27

def initialize
  @name = UNSET
  @handler = UNSET
end

Instance Attribute Details

#handlerCliqr::Events::Handler

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Event handler



19
20
21
# File 'lib/cliqr/config/event.rb', line 19

def handler
  @handler
end

#nameString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Name of the event

Returns:

  • (String)


12
13
14
# File 'lib/cliqr/config/event.rb', line 12

def name
  @name
end

Instance Method Details

#finalizeCliqr::Config::Base

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Finalize config by adding default values for unset values

Returns:



35
36
37
38
39
40
# File 'lib/cliqr/config/event.rb', line 35

def finalize
  @name = Config.get_if_unset(@name, '')
  @handler = Config.get_if_unset(@handler, nil)

  self
end