Class: Hackle::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/hackle/internal/model/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, variation_id: nil, bucket_id: nil) ⇒ Action

Returns a new instance of Action.

Parameters:

  • type (ActionType)
  • variation_id (Integer, nil) (defaults to: nil)
  • bucket_id (Integer, nil) (defaults to: nil)


17
18
19
20
21
# File 'lib/hackle/internal/model/action.rb', line 17

def initialize(type:, variation_id: nil, bucket_id: nil)
  @type = type
  @variation_id = variation_id
  @bucket_id = bucket_id
end

Instance Attribute Details

#bucket_idObject (readonly)

Returns the value of attribute bucket_id.



12
# File 'lib/hackle/internal/model/action.rb', line 12

attr_reader :type, :variation_id, :bucket_id

#typeActionType (readonly)

Returns:



12
13
14
# File 'lib/hackle/internal/model/action.rb', line 12

def type
  @type
end

#variation_idInteger? (readonly)

Returns:

  • (Integer, nil)


12
# File 'lib/hackle/internal/model/action.rb', line 12

attr_reader :type, :variation_id, :bucket_id