Class: Evntaly::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/evntaly/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title:, description:, message:, data:, tags:, notify:, icon:, apply_rule_only:, user:, type:, session_id:, feature:, topic:) ⇒ Event

Returns a new instance of Event.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/evntaly/event.rb', line 6

def initialize(title:, description:, message:, data:, tags:, notify:, icon:, apply_rule_only:, user:, type:, session_id:, feature:, topic:)
  @title = title
  @description = description
  @message = message
  @data = data
  @tags = tags
  @notify = notify
  @icon = icon
  @apply_rule_only = apply_rule_only
  @user = user
  @type = type
  @session_id = session_id
  @feature = feature
  @topic = topic
end

Instance Attribute Details

#apply_rule_onlyObject

Returns the value of attribute apply_rule_only.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def apply_rule_only
  @apply_rule_only
end

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def data
  @data
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def description
  @description
end

#featureObject

Returns the value of attribute feature.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def feature
  @feature
end

#iconObject

Returns the value of attribute icon.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def icon
  @icon
end

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def message
  @message
end

#notifyObject

Returns the value of attribute notify.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def notify
  @notify
end

#session_idObject

Returns the value of attribute session_id.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def session_id
  @session_id
end

#tagsObject

Returns the value of attribute tags.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def tags
  @tags
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def title
  @title
end

#topicObject

Returns the value of attribute topic.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def topic
  @topic
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def type
  @type
end

#userObject

Returns the value of attribute user.



3
4
5
# File 'lib/evntaly/event.rb', line 3

def user
  @user
end

Instance Method Details

#to_json(*_args) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/evntaly/event.rb', line 22

def to_json(*_args)
  {
    title: @title,
    description: @description,
    message: @message,
    data: @data,
    tags: @tags,
    notify: @notify,
    icon: @icon,
    apply_rule_only: @apply_rule_only,
    user: @user,
    type: @type,
    session_id: @session_id,
    feature: @feature,
    topic: @topic
  }.to_json
end