Class: Hackle::EventType

Inherits:
Object
  • Object
show all
Defined in:
lib/hackle/models/event_type.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, key:) ⇒ EventType

Returns a new instance of EventType.



5
6
7
8
# File 'lib/hackle/models/event_type.rb', line 5

def initialize(id:, key:)
  @id = id
  @key = key
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/hackle/models/event_type.rb', line 3

def id
  @id
end

#keyObject (readonly)

Returns the value of attribute key.



3
4
5
# File 'lib/hackle/models/event_type.rb', line 3

def key
  @key
end

Class Method Details

.undefined(key:) ⇒ Object



10
11
12
# File 'lib/hackle/models/event_type.rb', line 10

def self.undefined(key:)
  EventType.new(id: 0, key: key)
end